Page 1 of 1

parallax math update

Posted: Wed Sep 24, 2008 8:34 am
by LoneKiltedNinja
Now that I can play with multitexturing and normal/parallax mapping (and the shaders I'm assuming get written implicitly for normal/parallax), I'm wondering if there's a quick way to tell Irrlicht to rebuild the parallax shader and/or update the relevant inputs manually, e.g. when I know the camera-surface-light angles have changed.

I'm currently looking at a sphere with a simple parallax/normal map (basically the meat of example 11 wrapped in a new context) being lit by a point light and a directional light. When the lights move, everything of course looks fine, but when the sphere itself moves (I know, bad practice when using lighting shaders), the lights stay 'stuck' to the sphere since the shader only knows how to find the lights relative to the sphere's surface in its original location.