Reflection and GL Stencil
by Sam Guffey · in Technical Issues · 09/08/2002 (8:43 am) · 1 replies
Would it be difficult to include this into the fluid render to give the water a reflection based on the surrounding polys, I was reading a small tut on this and it doesnt seem to be that complex, so Im gonna try and add it but dont get your hopes up lol.
About the author
Associate Melv May
One of the reasons I didn't pursue this code any further is because of stencil support on cards. They are either not supported at all, supported but *very* slow or only work in 32-bit mode.
To be effective you will want to change the D3D/OpenGL routines for Windows/Unix/Mac to check for this support and then proceed from there.
This was one of the things that ultimately put me off as there are other methods to implement reflections using things like Render to texture and using a pre-render mask the water. This requires a slight of hand with SceneRenderImages although I can tell you it works better.
Other methods are using vertex shader programs to flip vertices around the surface plane but that's out for now.
- Melv.
- Melv.