Permalink
Browse files

renderer2: fix R_BuildCubeMaps (reflective specular requires normal

mapping) refs #1058
  • Loading branch information...
IR4T4 committed Jan 10, 2018
1 parent c0c66a4 commit 13a0549ae0ae967fb9c97f7ed186230f98c2c10e
Showing with 11 additions and 11 deletions.
  1. +6 −6 src/renderer2/tr_bsp.c
  2. +5 −5 src/renderer2/tr_glsl.c
View
@@ -7646,7 +7646,6 @@ void R_FindTwoNearestCubeMaps(const vec3_t position, cubemapProbe_t **cubeProbeN
*/
void R_BuildCubeMaps(void)
{
#if 1
int i, j; // k;
int ii, jj;
refdef_t rf;
@@ -7836,7 +7835,8 @@ void R_BuildCubeMaps(void)
do
{
Ren_Print("*");
Ren_Developer("*");
// FIXME: updating screen doesn't work properly, R_BuildCubeMaps during map load causes eye cancer
Ren_UpdateScreen();
}
while (++tics < ticsNeeded);
@@ -7846,9 +7846,9 @@ void R_BuildCubeMaps(void)
{
if (tics < 51)
{
Ren_Print("*");
Ren_Developer("*");
}
Ren_Print("\n");
Ren_Developer("\n");
}
}
@@ -8184,8 +8184,6 @@ void R_BuildCubeMaps(void)
endTime = ri.Milliseconds();
Ren_Developer("cubemap probes pre-rendering time of %i cubes = %5.2f seconds\n", tr.cubeProbes.currentElements,
(endTime - startTime) / 1000.0);
#endif
}
/**
@@ -8347,6 +8345,8 @@ void RE_LoadWorldMap(const char *name)
}
// build cubemaps after the necessary vbo stuff is done
// FIXME: causes missing vbo error on radar (maps with portal sky or foliage )
// devmap oasis; set developer 1; set r_showcubeprobs 1
//R_BuildCubeMaps();
// never move this to RE_BeginFrame because we need it to set it here for the first frame
View
@@ -740,7 +740,7 @@ static qboolean GLSL_MissesRequiredMacros(int compilemacro, int usedmacros)
}
break;
case USE_REFLECTIVE_SPECULAR:
if (usedmacros & BIT(USE_NORMAL_MAPPING))
if (!(usedmacros & BIT(USE_NORMAL_MAPPING)))
{
return qtrue;
}
@@ -1439,7 +1439,7 @@ static qboolean GLSL_GenerateMacroString(shaderProgramList_t *program, const cha
if (GLSL_MissesRequiredMacros(i, macroatrib))
{
Ren_Print("GLSL_GenerateMacroString Info: Missing required macros\n");
Ren_Print("GLSL_GenerateMacroString Info: Missing required macros program '%s' macros: '%s' macroattrib: %i\n", complieMacroNames[i], macros, macroatrib);
return qfalse;
}
@@ -2603,10 +2603,10 @@ void GLSL_DeleteShaderProgramList(shaderProgramList_t *programlist)
}
/**
* @brief GLSL_DeleteShaderProramInfo
* @brief GLSL_DeleteShaderProgramInfo
* @param[in] program
*/
void GLSL_DeleteShaderProramInfo(programInfo_t *program)
void GLSL_DeleteShaderProgramInfo(programInfo_t *program)
{
int i;
@@ -2780,7 +2780,7 @@ void GLSL_ShutdownGPUShaders(void)
if (hashTable[i])
{
programInfo_t *prog = hashTable[i];
GLSL_DeleteShaderProramInfo(prog);
GLSL_DeleteShaderProgramInfo(prog);
Com_Dealloc(prog);
hashTable[i] = NULL;
}

0 comments on commit 13a0549

Please sign in to comment.