Friday I was composing some object shaders and integrated them into the project. At some point we realized that under-water objects where reflected as they were above the water although I was using clipping panes. I thought I screwed up something but an idea made me check everything without the shaders and I found the trouble maker: the default shader of virtools is setting ClipPlaneEnable to zero!
After the initial shock, I thought: interesting, can it entirely be setup and used inside the HLSL technique definitions? Soon I dropped that idea, because I would have to do technique-switching and that requires manual bookkeeping as Virtools offers no help with that. So how could I get back my correct reflections?
I thought about an old workaround I did somewhen in end 2006 or early 2007 but for this scenario it wouldn't work. This time I really would need some kind of "texkill" instruction that I did not found back then. And you know what? The HLSL counterpart is
Probably you all already know about that, but for me it's my new best "HLSL friend"! 🙂
All fine now 8)
(Btw. in regards to the default shader, it might be a better idea to omit that state overwrite. Don't know how this is helpful in the way it is right now. )