mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Add shadow toggle (F4) and distance-based WMO group culling
Shadow toggle allows disabling shadow pass for performance testing. Distance culling skips WMO groups beyond 200 units. Occlusion queries disabled by default as overhead outweighs benefits in dense scenes.
This commit is contained in:
parent
83ef27c570
commit
ebf349ec7c
5 changed files with 29 additions and 11 deletions
|
|
@ -1039,8 +1039,14 @@ void Renderer::renderWorld(game::World* world) {
|
|||
lastM2RenderMs = 0.0;
|
||||
|
||||
// Shadow pass (before main scene)
|
||||
if (shadowFBO && shadowShaderProgram && terrainLoaded) {
|
||||
if (shadowsEnabled && shadowFBO && shadowShaderProgram && terrainLoaded) {
|
||||
renderShadowPass();
|
||||
} else {
|
||||
// Clear shadow maps when disabled
|
||||
if (terrainRenderer) terrainRenderer->clearShadowMap();
|
||||
if (wmoRenderer) wmoRenderer->clearShadowMap();
|
||||
if (m2Renderer) m2Renderer->clearShadowMap();
|
||||
if (characterRenderer) characterRenderer->clearShadowMap();
|
||||
}
|
||||
|
||||
// Bind HDR scene framebuffer for world rendering
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue