Possible Implementation of Deep Shadow Map in OpenGL

Before reading this post, I assume the reader already know the implementation of traditional shadow map in OpenGL: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/ Pixar movie Brave use deep shadow map approach to render hair shadow (as well as its self-shadow): Possible Implementation in OpenGL: Use 3D texture as shadow map depth texture.  The reason …

Continue reading

Ray-tracing Refraction – Floating Point Error

To implement refraction in ray-tracing rendering, we can simply use the refraction equation: sin(theta1)/sin(theta2) = n2/n1   To compute sin(theta1), simply: cos(theta1)= v1.dot(N); sin(theta1) = sqrt(1-cos(theta1) * cos(theta1));  where v1 is the incomming ray direction, and N is the surface normal. However, there may be trouble when this implementation runs …

Continue reading