This commit is contained in:
commit
e1b4bb11ba
19 changed files with 114 additions and 71 deletions
|
|
@ -153,6 +153,8 @@ public:
|
|||
|
||||
float mSceneClearColor[3];
|
||||
|
||||
float mGlobVis = 0.0f;
|
||||
|
||||
FGLRenderer(OpenGLFrameBuffer *fb);
|
||||
~FGLRenderer() ;
|
||||
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ bool FRenderState::ApplyShader()
|
|||
activeShader->muDesaturation.Set(mDesaturation / 255.f);
|
||||
activeShader->muFogEnabled.Set(fogset);
|
||||
activeShader->muPalLightLevels.Set(static_cast<int>(gl_bandedswlight) | (static_cast<int>(gl_fogmode) << 8));
|
||||
activeShader->muGlobVis.Set(GLRenderer->mGlobVis / 32.0f);
|
||||
activeShader->muTextureMode.Set(mTextureMode);
|
||||
activeShader->muCameraPos.Set(mCameraPos.vec);
|
||||
activeShader->muLightParms.Set(mLightParms);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ CVAR(Bool, gl_sort_textures, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
EXTERN_CVAR (Bool, cl_capfps)
|
||||
EXTERN_CVAR (Bool, r_deathcamera)
|
||||
EXTERN_CVAR (Float, underwater_fade_scalar)
|
||||
|
||||
EXTERN_CVAR (Float, r_visibility)
|
||||
|
||||
extern bool NoInterpolateView;
|
||||
|
||||
|
|
@ -785,6 +785,8 @@ sector_t * GLSceneDrawer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, f
|
|||
R_SetupFrame (r_viewpoint, r_viewwindow, camera);
|
||||
SetViewArea();
|
||||
|
||||
GLRenderer->mGlobVis = R_GetGlobVis(r_viewwindow, r_visibility);
|
||||
|
||||
// We have to scale the pitch to account for the pixel stretching, because the playsim doesn't know about this and treats it as 1:1.
|
||||
double radPitch = r_viewpoint.Angles.Pitch.Normalized180().Radians();
|
||||
double angx = cos(radPitch);
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
muDesaturation.Init(hShader, "uDesaturationFactor");
|
||||
muFogEnabled.Init(hShader, "uFogEnabled");
|
||||
muPalLightLevels.Init(hShader, "uPalLightLevels");
|
||||
muGlobVis.Init(hShader, "uGlobVis");
|
||||
muTextureMode.Init(hShader, "uTextureMode");
|
||||
muCameraPos.Init(hShader, "uCameraPos");
|
||||
muLightParms.Init(hShader, "uLightAttr");
|
||||
|
|
|
|||
|
|
@ -260,6 +260,7 @@ class FShader
|
|||
FBufferedUniform1f muDesaturation;
|
||||
FBufferedUniform1i muFogEnabled;
|
||||
FBufferedUniform1i muPalLightLevels;
|
||||
FBufferedUniform1f muGlobVis;
|
||||
FBufferedUniform1i muTextureMode;
|
||||
FBufferedUniform4f muCameraPos;
|
||||
FBufferedUniform4f muLightParms;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue