Stabilize shadows and soften foliage shadow casting

This commit is contained in:
Kelsi 2026-02-04 16:22:18 -08:00
parent f17b15395d
commit 979c0b5592
8 changed files with 136 additions and 13 deletions

View file

@ -158,6 +158,11 @@ public:
*/
void render(const Camera& camera, const glm::mat4& view, const glm::mat4& projection);
/**
* Render depth-only pass for shadow casting
*/
void renderShadow(GLuint shadowShaderProgram);
/**
* Render smoke particles (call after render())
*/

View file

@ -180,6 +180,8 @@ private:
uint32_t shadowDepthTex = 0;
uint32_t shadowShaderProgram = 0;
glm::mat4 lightSpaceMatrix = glm::mat4(1.0f);
glm::vec3 shadowCenter = glm::vec3(0.0f);
bool shadowCenterInitialized = false;
void initShadowMap();
void renderShadowPass();