diff --git a/Source/Project64-video/Main.cpp b/Source/Project64-video/Main.cpp index 02ba56c44..de3a7d5a3 100644 --- a/Source/Project64-video/Main.cpp +++ b/Source/Project64-video/Main.cpp @@ -534,18 +534,7 @@ int InitGfx() if (g_settings->fog()) //"FOGCOORD" extension { - GrFog_t fog_t[64]; - gfxFogGenerateLinear(fog_t, 0.0f, 255.0f); - - for (int i = 63; i > 0; i--) - { - if (fog_t[i] - fog_t[i - 1] > 63) - { - fog_t[i - 1] = fog_t[i] - 63; - } - } - fog_t[0] = 0; - grFogTable(fog_t); + gfxFogGenerateLinear(0.0f, 255.0f); grVertexLayout(GR_PARAM_FOG_EXT, offsetof(VERTEX, f), GR_PARAM_ENABLE); } diff --git a/Source/Project64-video/Renderer/OGLEScombiner.cpp b/Source/Project64-video/Renderer/OGLEScombiner.cpp index 4c3178322..eaf61cef3 100644 --- a/Source/Project64-video/Renderer/OGLEScombiner.cpp +++ b/Source/Project64-video/Renderer/OGLEScombiner.cpp @@ -1591,7 +1591,7 @@ void gfxFogMode(GrFogMode_t mode) need_to_compile = 1; } -void gfxFogGenerateLinear(GrFog_t *fogtable, float nearZ, float farZ) +void gfxFogGenerateLinear(float nearZ, float farZ) { WriteTrace(TraceGlitch, TraceDebug, "nearZ: %f farZ: %f", nearZ, farZ); /* @@ -1604,12 +1604,6 @@ void gfxFogGenerateLinear(GrFog_t *fogtable, float nearZ, float farZ) fogEnd = farZ / 255.0f; } -FX_ENTRY void FX_CALL -grFogTable(const GrFog_t /*ft */[]) -{ - WriteTrace(TraceGlitch, TraceDebug, "-"); -} - FX_ENTRY void FX_CALL grFogColorValue(GrColor_t fogcolor) { diff --git a/Source/Project64-video/Renderer/OGLcombiner.cpp b/Source/Project64-video/Renderer/OGLcombiner.cpp index 043b4abb6..2f8edaecc 100644 --- a/Source/Project64-video/Renderer/OGLcombiner.cpp +++ b/Source/Project64-video/Renderer/OGLcombiner.cpp @@ -1536,7 +1536,7 @@ void gfxFogMode(GrFogMode_t mode) grDisplayGLError("gfxFogMode"); } -void gfxFogGenerateLinear(GrFog_t *fogtable, float nearZ, float farZ) +void gfxFogGenerateLinear(float nearZ, float farZ) { WriteTrace(TraceGlitch, TraceDebug, "nearZ: %f farZ: %f", nearZ, farZ); glFogi(GL_FOG_MODE, GL_LINEAR); @@ -1547,12 +1547,6 @@ void gfxFogGenerateLinear(GrFog_t *fogtable, float nearZ, float farZ) grDisplayGLError("gfxFogGenerateLinear"); } -FX_ENTRY void FX_CALL -grFogTable(const GrFog_t /*ft */[]) -{ - WriteTrace(TraceGlitch, TraceDebug, "-"); -} - FX_ENTRY void FX_CALL grFogColorValue(GrColor_t fogcolor) { diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index fb55a0106..fd73d158c 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -31,7 +31,7 @@ void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, G void gfxAlphaTestReferenceValue(gfxAlpha_t value); void gfxAlphaTestFunction(GrCmpFnc_t function); void gfxFogMode(GrFogMode_t mode); -void gfxFogGenerateLinear(GrFog_t *fogtable, float nearZ, float farZ); +void gfxFogGenerateLinear(float nearZ, float farZ); extern uint32_t nbTextureUnits; extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;