Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualphil_t

Posted 22 April 2013 - 04:53 AM

but the world position in vertex shader is vertex-based, how do I know what's the world position for every fragment(or pixel)?

 

Just like I described: you pass it out of the vertex shader, and then you get the interpolated value in the pixel shader.


#1phil_t

Posted 22 April 2013 - 04:52 AM

but the world position in vertex shader is vertex-based, how do I know what's the world position for every fragment(or pixel)?

 

Just like I described: you pass it out of the vertex shader, and then you get the interpolated value in the pixel shader.

 

and what space is the xy axes of shadow map in? I think it's in window space which are all integers. but view * Projection matrix only take us to clip space right?


 

Whatever View * Projection you used when rendering your shadow map. That.


PARTNERS