]> git.xonotic.org Git - xonotic/darkplaces.git/commit
Rework r_shadow_shadowmode to be more maintainable and understandable - it now caches...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 24 May 2020 07:06:25 +0000 (07:06 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 24 May 2020 07:06:25 +0000 (07:06 +0000)
commitfea2bc5df01d8be044e1b344b7528aac5d0c1617
treeed3a95ec8c483c8b61058216e29f6307a207c53d
parent1857323bffc66bee0eadc20a7ae46889837dcf1b
Rework r_shadow_shadowmode to be more maintainable and understandable - it now caches the values of r_shadow_shadowmapping and r_shadow_deferred, and is now updated when those change, rather than just at startup, and changing those now also causes a recompile of world lights (which always had different bounds when shadowing was on/off, toggling shadows had weird behavior as a result, so this is a bugfix).

This fixes a massive fps drain with settings that disabled shadows entirely by disabling shadowmapping (where r_shadow_shadowmapping 0 and r_shadow_deferred 0 together caused it to reallocate the shadowmap texture every frame and do other bad stuff)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12562 d7cf8633-e32d-0410-b094-e92efae38249
client.h
r_shadow.c