This topic is now archived and is closed to further replies.


Pixel Shading : normal based on derivative of spline func

Recommended Posts

Despite the technical title, I am stuck with the following problem : i wanna do a landscape engine. right. using a raycasting engine. in the same style as c&c2. the height of a point is calculated using quadratic interpolation (splines). Now the way to find the pseudo-normal for the pixel that will be used for shading is the following : this pseudo-normal is actually the plane normal of the plane tangent to the point. How do you find this normal ? i know you have to use derivatives but i can only do it in 1D, not in 2d (probably involves using complex numbers or something). Please help ! thanks mustard

Share this post

Link to post
Share on other sites