Jump to content
  • Advertisement
Sign in to follow this  
rouncED

Hardware raytraced displacement mapping

This topic is 3475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im trying to implement raytraced perpixel displacement mapping on the gpu in direct x 10. You extrude from each triangle a prism made out of 3 tetrahedrons, then you pass them to the pixel shader. You use the tangent frame to convert the eye ray into a textural ray and you can gather samples off the displacement map, its just the problem is I cant figure out how to stop the ray from continually sampling when it hits the back of the individual tetrahedron. How do you work this out?

Share this post


Link to post
Share on other sites
Advertisement
I figured out a way to do it, in the geometry shader project the tetrahedrons, and there is a 4th point you can find by intersecting the front edge with the back edge.
You can then find the back texture coordinate and the front texture coordinate.
You then take this projected tetrahedron and render it in 4 triangles with back facing texture coordinates and front facing and you should be able to trace a ray between them.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!