Hello all

I have just started to learn HLSL, so I am atm a shader noob

Imagine that there is a plane in 3dgs, at origin 0, and it extends to -4000 and 4000 on the x axis and -4000 and 4000 on the y axis (a square, large plane).

When a camera is above the plane, I want to get the camera's coordinates and convert them into the texture "space" ? of the plane, so the camera's position turns into the range 0 and 1 I think it is.

I am just having trouble getting the camera's position in world space into the range 0 and 1 for the shader's texture? (so later I can, for example, draw something under the camera on the plane)

Any ideas? Is this the best way to do it?

Thanks,
Adoado.


Visit our development blog: http://yellloh.com