- fixed shadows in Shadow Warrior.

They use a shade of 127 which wasn't clamped to a valid range in the backend.
This commit is contained in:
Christoph Oelckers 2020-06-12 21:40:49 +02:00
parent 65ddb6cb59
commit 9b03537f3a

View file

@ -11,6 +11,7 @@
#include "hw_material.h"
#include "hw_renderstate.h"
#include "pm_renderstate.h"
#include "templates.h"
class FShader;
class FGameTexture;
@ -167,7 +168,7 @@ public:
void SetShade(int32_t shade, int numshades)
{
renderState.Shade = shade;
renderState.Shade = clamp(shade, 0, numshades-1);
}
void SetVisibility(float visibility)