|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
CPU mirror of the GLSL FrameConstants block (std140). More...
#include <FrameConstants.hpp>
Public Attributes | |
| glm::mat4 | viewProjection {1.0f} |
| glm::vec4 | camera {0.0f, 0.0f, 1.0f, 0.0f} |
| glm::mat4 | inverseViewProjection {1.0f} |
| glm::vec4 | renderOrigin {0.0f} |
| The render origin (RenderOrigin.hpp): a world position is the one the shader holds plus this, for what depends on the world's own coordinates. | |
CPU mirror of the GLSL FrameConstants block (std140).
A mat4 at 0, a vec4 at 64 and a mat4 at 80 need no std140 padding. Append future fields here and in ShaderParser's injected block in the same order. camera: w = 1 means xyz is the eye's world position (perspective), w = 0 that xyz points at the viewer.
Definition at line 37 of file FrameConstants.hpp.
| glm::vec4 esengine::FrameConstants::camera {0.0f, 0.0f, 1.0f, 0.0f} |
Definition at line 39 of file FrameConstants.hpp.
| glm::mat4 esengine::FrameConstants::inverseViewProjection {1.0f} |
The inverse of the matrix ABOVE, so a shader holding a depth sample can put it back in the world — of the UPLOADED one, since what a shader un-projects is the clip space its own device rasterised into. Without it a sampled depth is a number with no length in it.
Definition at line 46 of file FrameConstants.hpp.
| glm::vec4 esengine::FrameConstants::renderOrigin {0.0f} |
The render origin (RenderOrigin.hpp): a world position is the one the shader holds plus this, for what depends on the world's own coordinates.
Definition at line 48 of file FrameConstants.hpp.
| glm::mat4 esengine::FrameConstants::viewProjection {1.0f} |
Definition at line 38 of file FrameConstants.hpp.