Hi,
Here's a Stencil Mirror demo for v1.88:
http://www.tomspeed.com/stencil_mirror
Get all the files, copy the userlib contents to your blitz3d\userlibs folder. NOTE! these have changed since the shadow volume demo and are specific to this demo. (back up old dx7test files if you wish)
This is based off a DX7 SDK demo, some things to note:
ATI cards: It works on some, doesn't on others. Beakers new x800 with latest drivers works, bot_builders Radeon 9600 works. Lucids Radeon 9700 doesn't. (drivers??)
Works fine on NVidia cards. Works fine on Zeniths built in Intel chipset! :)
There's more than 1 way to do do stencil mirrors, dependant on the order you do render color/mirror/reversed mirror, this demo actualy uses 1 more render pass than I 'think' is needed, but I can't seem to get objects to render in front of the mirror without the last pass.
There's also a glitch when the mirror is at certain angles, dunno what's causing that yet, though I suspect it's something to do with me using User Defined Clipping Planes.
Stencil mirrors can be any shape, so long as it's flat on Z axis.
Speaking of which, you can do mirrors using no stencil and just clipping planes, but you'd be forced to use a 4 sided mirror, I'm trying that method next.
Go ahead and experiment with the renderstates!...and see some weird results :)
Cya!
Tom
p.s Thanks Mark for negative scaling!!! That saved me from doing a bunch of matrix maths to reverse the camera :)
Here's a Stencil Mirror demo for v1.88:
http://www.tomspeed.com/stencil_mirror
Get all the files, copy the userlib contents to your blitz3d\userlibs folder. NOTE! these have changed since the shadow volume demo and are specific to this demo. (back up old dx7test files if you wish)
This is based off a DX7 SDK demo, some things to note:
ATI cards: It works on some, doesn't on others. Beakers new x800 with latest drivers works, bot_builders Radeon 9600 works. Lucids Radeon 9700 doesn't. (drivers??)
Works fine on NVidia cards. Works fine on Zeniths built in Intel chipset! :)
There's more than 1 way to do do stencil mirrors, dependant on the order you do render color/mirror/reversed mirror, this demo actualy uses 1 more render pass than I 'think' is needed, but I can't seem to get objects to render in front of the mirror without the last pass.
There's also a glitch when the mirror is at certain angles, dunno what's causing that yet, though I suspect it's something to do with me using User Defined Clipping Planes.
Stencil mirrors can be any shape, so long as it's flat on Z axis.
Speaking of which, you can do mirrors using no stencil and just clipping planes, but you'd be forced to use a 4 sided mirror, I'm trying that method next.
Go ahead and experiment with the renderstates!...and see some weird results :)
Cya!
Tom
p.s Thanks Mark for negative scaling!!! That saved me from doing a bunch of matrix maths to reverse the camera :)