Jump to content
  • Advertisement
Sign in to follow this  
erik rostock

Project a grid in screenspace on the world xz plane.

This topic is 3341 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

Hi, I want to project a grid on the xz-plane like shown here: http://habibs.files.wordpress.com/2009/07/2-1.jpg To do that, I created a vertex grid with x and z range [-1|1]. In the shader I multiply the xz screen coordinate of a vertex with the inverse of the View-Projection matrix. Then I want to adjust the height, depending on the new world xz coordinates and finally I transform these coordinates back to screenspace by multiplying them with the View-Projection matrix. I dont know why, but I get a very strange plane shown on the screen. Are the mathematical oprations I use correct? Best, erik

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!