mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
In Polymost, make r_usenewaspect=2 fog independent of screen x size.
git-svn-id: https://svn.eduke32.com/eduke32@3307 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
192e863dd6
commit
55283e5ce6
3 changed files with 8 additions and 6 deletions
|
@ -8505,9 +8505,11 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
|
|||
break;
|
||||
#ifdef USE_OPENGL
|
||||
case 3:
|
||||
// I have no idea what the significance of this constant is,
|
||||
// it was found out experimentally. v v
|
||||
globalvisibility = scale(g_visibility<<2, xdimen, 1100);
|
||||
// NOTE: In Polymost, the fragment depth depends on the x screen size!
|
||||
if (r_usenewshading==2)
|
||||
globalvisibility = scale(g_visibility<<2, xdimen, 1680);
|
||||
else
|
||||
globalvisibility = scale(g_visibility<<2, xdimen, 1100);
|
||||
break;
|
||||
# ifdef POLYMER
|
||||
case 4:
|
||||
|
|
|
@ -411,7 +411,7 @@ _prprogrambit prprogrambits[PR_BIT_COUNT] = {
|
|||
" fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fragDepth * 1.442695);\n"
|
||||
#ifdef PR_LINEAR_FOG
|
||||
/* 0.65127==150/230, another constant found out by experiment. :/
|
||||
* (150 is Polymost's FOGDISTCONST.) */
|
||||
* (150 is Polymost's old FOGDISTCONST.) */
|
||||
" } else {\n"
|
||||
" fogFactor = gl_Fog.scale * (gl_Fog.end - fragDepth*0.65217);\n"
|
||||
" fogFactor = clamp(fogFactor, 0.0, 1.0);"
|
||||
|
|
|
@ -839,7 +839,7 @@ void polymost_glinit()
|
|||
extern char nofog; // in windows/SDL layers
|
||||
|
||||
// For GL_LINEAR fog:
|
||||
#define FOGDISTCONST 150
|
||||
#define FOGDISTCONST 600
|
||||
#define FULLVIS_BEGIN 2.9e38
|
||||
#define FULLVIS_END 3.0e38
|
||||
|
||||
|
@ -849,7 +849,7 @@ static inline void fogcalc(int32_t shade, int32_t vis, int32_t pal)
|
|||
|
||||
if (r_usenewshading==2)
|
||||
{
|
||||
float combvis = (float)(g_visibility * (uint8_t)(vis+16));
|
||||
float combvis = (float)globalvisibility * (uint8_t)(vis+16);
|
||||
|
||||
bglFogi(GL_FOG_MODE, GL_LINEAR);
|
||||
|
||||
|
|
Loading…
Reference in a new issue