Improved the shadows with a larger texture, PCF for the edges, and only calculating the shadows once.
This commit is contained in:
parent
621c355876
commit
4747d297e8
4 changed files with 49 additions and 25 deletions
|
|
@ -52,7 +52,7 @@ struct Scene {
|
|||
Shader depth_dbg_shader{{"shaders/33-shadow_dbg.vert.glsl", "shaders/33-shadow_dbg.frag.glsl", ""}};
|
||||
unsigned int depth_FBO = UINT_MAX;
|
||||
unsigned int depth_map = UINT_MAX;
|
||||
const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024;
|
||||
const unsigned int SHADOW_WIDTH = 1024 * 8, SHADOW_HEIGHT = 1024 * 8;
|
||||
float near_plane = 1.0f;
|
||||
float far_plane = 100.0f;
|
||||
|
||||
|
|
@ -74,6 +74,8 @@ struct Scene {
|
|||
unsigned int quadVAO = UINT_MAX;
|
||||
unsigned int quadVBO = UINT_MAX;
|
||||
|
||||
bool shadows_rendered = false;
|
||||
|
||||
Scene(components::Scene& config):
|
||||
shader{config.shader},
|
||||
reflect_shader{config.reflect_shader},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue