Polymost shade table interpolation patch from Nuke.YKT

git-svn-id: https://svn.eduke32.com/eduke32@7650 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
This commit is contained in:
terminx 2019-05-19 03:54:24 +00:00 committed by Christoph Oelckers
parent 6db4ac3b01
commit 410da8a085

View file

@ -679,11 +679,13 @@ void polymost_npotEmulation(char npotEmulation, float factor, float xOffset)
void polymost_shadeInterpolate(int32_t shadeInterpolate) void polymost_shadeInterpolate(int32_t shadeInterpolate)
{ {
if (currentShaderProgramID != polymost1CurrentShaderProgramID || shadeInterpolate == polymost1ShadeInterpolate) if (currentShaderProgramID == polymost1CurrentShaderProgramID)
return; {
polymost1ShadeInterpolate = shadeInterpolate; polymost1ShadeInterpolate = shadeInterpolate;
glUniform1f(polymost1ShadeInterpolateLoc, polymost1ShadeInterpolate); glUniform1f(polymost1ShadeInterpolateLoc, polymost1ShadeInterpolate);
}
} }
void polymost_setBrightness(int brightness){ void polymost_setBrightness(int brightness){
if (currentShaderProgramID == polymost1CurrentShaderProgramID) if (currentShaderProgramID == polymost1CurrentShaderProgramID)
{ {
@ -5424,6 +5426,8 @@ void polymost_drawrooms()
gvisibility = ((float)globalvisibility)*FOGSCALE; gvisibility = ((float)globalvisibility)*FOGSCALE;
polymost_shadeInterpolate(r_shadeinterpolate);
//global cos/sin height angle //global cos/sin height angle
if (r_yshearing) if (r_yshearing)
{ {