|
| PerspectiveVertexShader (uint32_t framebuffer_width, uint32_t framebuffer_height, float z_min=0, float z_max=0x7FFF, float fov_y=M_PI *0.25f, float near=1.0f, float far=10.0f) |
|
void | SetNear (float val) |
|
void | SetFar (float val) |
|
| ProjectionVertexShader (uint32_t framebuffer_width, uint32_t framebuffer_height, float z_min=0, float z_max=0x7FFF, bool enable_lighting=true) |
|
void | SetLightingEnabled (bool enabled=true) |
|
void | SetUseD3DStyleViewport (bool enable=true) |
|
void | SetZMin (float val) |
|
void | SetZMax (float val) |
|
float | GetZMin () const |
|
float | GetZMax () const |
|
void | LookAt (const vector_t &camera_position, const vector_t &look_at_point) |
|
void | LookAt (const vector_t &camera_position, const vector_t &look_at_point, const vector_t &up) |
|
void | LookTo (const vector_t &camera_position, const vector_t &camera_direction, const vector_t &up) |
|
void | SetCamera (const vector_t &position, const vector_t &rotation) |
|
void | SetDirectionalLightDirection (const vector_t &direction) |
| Sets the direction from the origin towards the directional light.
|
|
void | SetDirectionalLightCastDirection (const vector_t &direction) |
| Sets the direction in which the directional light is casting light.
|
|
matrix4_t & | GetModelMatrix () |
|
matrix4_t & | GetViewMatrix () |
|
matrix4_t & | GetProjectionMatrix () |
|
matrix4_t & | GetViewportMatrix () |
|
matrix4_t & | GetProjectionViewportMatrix () |
|
void | ProjectPoint (vector_t &result, const vector_t &world_point) const |
|
void | UnprojectPoint (vector_t &result, const vector_t &screen_point) const |
| Unprojects the given screen point, producing world coordinates that will project there.
|
|
void | UnprojectPoint (vector_t &result, const vector_t &screen_point, float world_z) const |
| Unprojects the given screen point, producing world coordinates that will project there with the given Z value.
|
|
void | SetTransposeOnUpload (bool transpose=true) |
| Causes matrices to be transposed before being uploaded to the shader.
|
|
void | Activate () |
|
void | PrepareDraw () |
|
void | SetShaderOverride (const uint32_t *shader, uint32_t shader_size) |
|
void | SetUniform4x4F (uint32_t slot, const XboxMath::matrix4_t &value) |
|
void | SetUniform4F (uint32_t slot, const float *value) |
|
void | SetUniform4I (uint32_t slot, const uint32_t *value) |
|
void | SetUniformF (uint32_t slot, float x, float y=0.0f, float z=0.0f, float w=0.0f) |
|
void | SetUniformI (uint32_t slot, uint32_t x, uint32_t y=0, uint32_t z=0, uint32_t w=0) |
|
|
void | CalculateProjectionMatrix () override |
|
void | OnActivate () override |
|
void | OnLoadShader () override |
|
void | OnLoadConstants () override |
|
void | LoadShaderProgram (const uint32_t *shader, uint32_t shader_size) const |
|
void | SetTransformConstantBlock (std::map< uint32_t, TransformConstant > &constants_map, uint32_t slot, const uint32_t *values, uint32_t num_slots) |
|
void | SetBaseUniform4x4F (uint32_t slot, const XboxMath::matrix4_t &value) |
|
void | SetBaseUniform4F (uint32_t slot, const float *value) |
|
void | SetBaseUniform4I (uint32_t slot, const uint32_t *value) |
|
void | SetBaseUniformF (uint32_t slot, float x, float y=0.0f, float z=0.0f, float w=0.0f) |
|
void | SetBaseUniformI (uint32_t slot, uint32_t x, uint32_t y=0, uint32_t z=0, uint32_t w=0) |
|
void | UploadConstants () |
|
|
static constexpr auto | kShaderUserConstantOffset = 96 |
|
float | framebuffer_width_ {0.0} |
|
float | framebuffer_height_ {0.0} |
|
float | z_min_ |
|
float | z_max_ |
|
bool | enable_lighting_ {true} |
|
bool | use_d3d_style_viewport_ {false} |
|
matrix4_t | model_matrix_ {} |
|
matrix4_t | view_matrix_ {} |
|
matrix4_t | projection_matrix_ {} |
|
matrix4_t | viewport_matrix_ {} |
|
matrix4_t | projection_viewport_matrix_ {} |
|
matrix4_t | composite_matrix_ {} |
|
matrix4_t | inverse_composite_matrix_ {} |
|
vector_t | camera_position_ = {0, 0, -2.25, 1} |
|
vector_t | light_direction_ = {0, 0, 1, 1} |
|
bool | transpose_on_upload_ {false} |
|
const uint32_t * | shader_override_ {nullptr} |
|
uint32_t | shader_override_size_ {0} |
|
std::map< uint32_t, TransformConstant > | base_transform_constants_ |
| Map of index to constants that will be loaded starting at c[96].
|
|
std::map< uint32_t, TransformConstant > | uniforms_ |
|
bool | uniform_upload_required_ {true} |
|