mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Stabilize shadows and soften foliage shadow casting
This commit is contained in:
parent
f17b15395d
commit
979c0b5592
8 changed files with 136 additions and 13 deletions
|
|
@ -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())
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue