| 108 | } |
| 109 | |
| 110 | void stable_cascaded_shadows::pre_draw() |
| 111 | { |
| 112 | glEnable(GL_DEPTH_TEST); |
| 113 | |
| 114 | glEnable(GL_CULL_FACE); |
| 115 | glCullFace(GL_FRONT); |
| 116 | |
| 117 | glBindFramebuffer(GL_FRAMEBUFFER, shadowArrayFramebuffer); |
| 118 | glViewport(0, 0, static_cast<GLsizei>(resolution), static_cast<GLsizei>(resolution)); |
| 119 | glClear(GL_DEPTH_BUFFER_BIT); |
| 120 | |
| 121 | auto & shader = program.get()->get_variant()->shader; |
| 122 | |
| 123 | shader.bind(); |
| 124 | shader.uniform("u_cascadeViewMatrixArray", uniforms::NUM_CASCADES, viewMatrices); |
| 125 | shader.uniform("u_cascadeProjMatrixArray", uniforms::NUM_CASCADES, projMatrices); |
| 126 | } |
| 127 | |
| 128 | void stable_cascaded_shadows::update_shadow_matrix(const float4x4 & shadowModelMatrix) |
| 129 | { |
no test coverage detected