4#include <unordered_map>
14using std::unordered_map;
33 unordered_map<string, ShadowMapRenderShaderImplementation*>
shader;
110 void bindTexture(
int contextIdx, int32_t textureId);
129 void setShader(
int contextIdx,
const string&
id);
Shadow mapping shader to render shadow maps.
void initialize()
Initialize shadow map render shader program.
void updateLight(int contextIdx, int32_t lightId)
Update light.
void updateMatrices(int contextIdx)
Update matrices.
void setDepthBiasMVPMatrix(int contextIdx, const Matrix4x4 &depthBiasMVPMatrix)
Set up program depth bias mvp matrix.
Matrix4x4 depthBiasMVPMatrix
ShadowMapRenderShader(Renderer *renderer)
Public constructor.
void setRenderLightId(int32_t lightId)
Set light id.
void useProgram(Engine *engine)
Use shadow map render shader program.
~ShadowMapRenderShader()
Destructor.
void setShader(int contextIdx, const string &id)
Set shader.
vector< ShadowMapRenderShaderContext > contexts
void updateTextureMatrix(int contextIdx)
Update up texture matrix.
void updateShaderParameters(int contextIdx)
Update shader parameters.
void updateMaterial(int contextIdx)
Update material.
void bindTexture(int contextIdx, int32_t textureId)
Bind texture.
void unUseProgram()
Unuse shadow map render shader program.
unordered_map< string, ShadowMapRenderShaderImplementation * > shader
Shadow mapping shader interface to render shadow map.
ShadowMapRenderShaderImplementation * implementation