Im trying to implement a per-pixel displacement shader in GLSL. I read through several papers and "tutorials" I found and ended up with trying to implement the approach NVIDIA used in their Cascade ...
This is the relevant section of my fragment shader varying vec3 normal; varying vec3 halfv; ... vec4 color = ambient * gl_LightSource.ambient; vec3 n = normalize(normal); float ...
I am trying to figure out how to determine the depth of a pixel perfect collision in XNA. I want to know the depth in order to be able to use it in my collision response. At the moment I have the ...