Search This Blog

Thursday, April 8, 2010

iPad GLSL. From within a fragment shader how do I get the surface - not vertex - normal

Programmer Question

Is it possible to access the surface normal - the normal associated with the plane of a fragment - from within a fragment shader? Or perhaps this can be done in the vertex shader?



Is all knowledge of the associated geometry lost when we go down the shader pipeline or is there some clever way of recovering that information in either the vertex of fragment shader?



Thanks in advance.



Cheers,

Doug

twitter: @dugla



Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails