Members - Reputation: 592
Posted 14 October 2012 - 03:37 AM
I'm pretty bad with the mathz so I need some help here. I want to project a texture onto my terrain, around the position I click.
I got the basics of projective texturing and I thought that would would be a good idea to use it.
My idea was to simply use a viewmatrix from abouth the point and a orthogonal projectionmatrix with the size of the texture.
But the results are pretty wierd and since I don't understand the math behind the projectionmatrix I hoped someone could help me out here.
Crossbones+ - Reputation: 2881
Posted 14 October 2012 - 10:12 AM
Orthogonal projection, by contrast, is usually a combination of linear scaling and translation, with no correlation between the depth of the geometry and its scale.
If you need projection like that from a spotlight, then you need perspective projection as opposed to orthogonal. Orthogonal projection would suit a (pseudo)infinitely far away light source, like the sun as seen from earth, though.
Edited by Nik02, 14 October 2012 - 10:31 AM.