PDA

View Full Version : -> Reflection



Erakis
04-14-2002, 07:35 PM
Hello.

I've built a light particles engine and at the present time, I use it to simulate a water fountain. But I would like to reflect the water drop on the floor. How could I do that ?

Now I redraw the particles on the floor but with a NULL Y coord value. And I got some problem with their color reflection. Someone told me that Blending and the Stencil Test will be an asset to help me, but how ?

Thanks
Martin

rIO
04-16-2002, 01:48 AM
There are many methods to render reflections, in your situation the best way is to
render the particles,

then fill the stencil buffer with the reflecting shape (for example the water surface),

then render again the particles with stencil test enabled and negated Y (not NULLed!)

Also enable particle blending.

hope this helps...

rIO.sK http://www.spinningkids.org/rio