Tagged Questions
-1
votes
3answers
105 views
Directional light and matrix issues
I'm trying to implement basic directional lightning in OpenGL 3.3 by emulating the logic shown in this guide: http://www.arcsynthesis.org/gltut/Illumination/Tutorial%2009.html
I do not understand ...
4
votes
1answer
498 views
Multiplication for MVP matrices: Any benefits to doing so within the vertex shader?
I'd like to understand under what circumstances (if any) it is worth doing MVP matrix multiplication inside a vertex shader.
The vertex shader is run once per vertex, and a single mesh typically ...
4
votes
2answers
811 views
Should the modelview and projection matrices be calculated in the shader or on the CPU?
At minimum I would have a camera with rotation and world position; projections parameters such as angle of view and perspective vs. orthographic; and meshes with scale, angle, and world position.
...
2
votes
1answer
372 views
Transformed Pretransformed coordinates?
I am creating a minecraft like terrain engine thing in XNA and C#, and I am trying to create a item/block selector tool. The thing is I would like to have 3D objects on the tool. So I thought for the ...
4
votes
4answers
919 views
From camera coordinates to world coordinates
I want to calculate world coordinates from camera coordinates. However, I seem to have problems with my understandings of how matrices in HLSL work.
From world to camera is clear:
cameraPosition = ...