@@ -1466,12 +1466,12 @@ GLShader_lightMapping::GLShader_lightMapping( GLShaderManager *manager ) :
14661466 u_ModelViewProjectionMatrix( this ),
14671467 u_ParallaxDepthScale( this ),
14681468 u_ParallaxOffsetBias( this ),
1469- u_HeightMapInNormalMap( this ),
14701469 u_NormalScale( this ),
14711470 u_numLights( this ),
14721471 u_Lights( this ),
14731472 GLDeformStage( this ),
14741473 GLCompileMacro_USE_DELUXE_MAPPING( this ),
1474+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
14751475 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
14761476 GLCompileMacro_USE_PHYSICAL_SHADING( this )
14771477{
@@ -1503,6 +1503,7 @@ void GLShader_lightMapping::SetShaderProgramUniforms( shaderProgram_t *shaderPro
15031503 if ( !glConfig2.uniformBufferObjectAvailable ) {
15041504 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_Lights" ), 9 );
15051505 }
1506+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
15061507}
15071508
15081509GLShader_vertexLighting_DBS_entity::GLShader_vertexLighting_DBS_entity ( GLShaderManager *manager ) :
@@ -1517,7 +1518,6 @@ GLShader_vertexLighting_DBS_entity::GLShader_vertexLighting_DBS_entity( GLShader
15171518 u_VertexInterpolation( this ),
15181519 u_ParallaxDepthScale( this ),
15191520 u_ParallaxOffsetBias( this ),
1520- u_HeightMapInNormalMap( this ),
15211521 u_NormalScale( this ),
15221522 u_EnvironmentInterpolation( this ),
15231523 u_LightGridOrigin( this ),
@@ -1527,6 +1527,7 @@ GLShader_vertexLighting_DBS_entity::GLShader_vertexLighting_DBS_entity( GLShader
15271527 GLDeformStage( this ),
15281528 GLCompileMacro_USE_VERTEX_SKINNING( this ),
15291529 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1530+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
15301531 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
15311532 GLCompileMacro_USE_REFLECTIVE_SPECULAR( this ),
15321533 GLCompileMacro_USE_PHYSICAL_SHADING( this )
@@ -1561,6 +1562,7 @@ void GLShader_vertexLighting_DBS_entity::SetShaderProgramUniforms( shaderProgram
15611562 if ( !glConfig2.uniformBufferObjectAvailable ) {
15621563 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_Lights" ), 9 );
15631564 }
1565+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
15641566}
15651567
15661568GLShader_vertexLighting_DBS_world::GLShader_vertexLighting_DBS_world ( GLShaderManager *manager ) :
@@ -1578,14 +1580,14 @@ GLShader_vertexLighting_DBS_world::GLShader_vertexLighting_DBS_world( GLShaderMa
15781580 u_ModelViewProjectionMatrix( this ),
15791581 u_ParallaxDepthScale( this ),
15801582 u_ParallaxOffsetBias( this ),
1581- u_HeightMapInNormalMap( this ),
15821583 u_NormalScale( this ),
15831584 u_LightWrapAround( this ),
15841585 u_LightGridOrigin( this ),
15851586 u_LightGridScale( this ),
15861587 u_numLights( this ),
15871588 u_Lights( this ),
15881589 GLDeformStage( this ),
1590+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
15891591 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
15901592 GLCompileMacro_USE_PHYSICAL_SHADING( this )
15911593{
@@ -1616,6 +1618,7 @@ void GLShader_vertexLighting_DBS_world::SetShaderProgramUniforms( shaderProgram_
16161618 if ( !glConfig2.uniformBufferObjectAvailable ) {
16171619 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_Lights" ), 9 );
16181620 }
1621+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
16191622}
16201623
16211624GLShader_forwardLighting_omniXYZ::GLShader_forwardLighting_omniXYZ ( GLShaderManager *manager ):
@@ -1640,11 +1643,11 @@ GLShader_forwardLighting_omniXYZ::GLShader_forwardLighting_omniXYZ( GLShaderMana
16401643 u_VertexInterpolation( this ),
16411644 u_ParallaxDepthScale( this ),
16421645 u_ParallaxOffsetBias( this ),
1643- u_HeightMapInNormalMap( this ),
16441646 u_NormalScale( this ),
16451647 GLDeformStage( this ),
16461648 GLCompileMacro_USE_VERTEX_SKINNING( this ),
16471649 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1650+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
16481651 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
16491652 GLCompileMacro_USE_SHADOWING( this )
16501653{
@@ -1674,6 +1677,7 @@ void GLShader_forwardLighting_omniXYZ::SetShaderProgramUniforms( shaderProgram_t
16741677 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowMap" ), 5 );
16751678 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_RandomMap" ), 6 );
16761679 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap" ), 7 );
1680+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
16771681}
16781682
16791683GLShader_forwardLighting_projXYZ::GLShader_forwardLighting_projXYZ ( GLShaderManager *manager ):
@@ -1699,11 +1703,11 @@ GLShader_forwardLighting_projXYZ::GLShader_forwardLighting_projXYZ( GLShaderMana
16991703 u_VertexInterpolation( this ),
17001704 u_ParallaxDepthScale( this ),
17011705 u_ParallaxOffsetBias( this ),
1702- u_HeightMapInNormalMap( this ),
17031706 u_NormalScale( this ),
17041707 GLDeformStage( this ),
17051708 GLCompileMacro_USE_VERTEX_SKINNING( this ),
17061709 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1710+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
17071711 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
17081712 GLCompileMacro_USE_SHADOWING( this )
17091713{
@@ -1734,6 +1738,7 @@ void GLShader_forwardLighting_projXYZ::SetShaderProgramUniforms( shaderProgram_t
17341738 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowMap0" ), 5 );
17351739 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_RandomMap" ), 6 );
17361740 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap0" ), 7 );
1741+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
17371742}
17381743
17391744GLShader_forwardLighting_directionalSun::GLShader_forwardLighting_directionalSun ( GLShaderManager *manager ):
@@ -1761,11 +1766,11 @@ GLShader_forwardLighting_directionalSun::GLShader_forwardLighting_directionalSun
17611766 u_VertexInterpolation( this ),
17621767 u_ParallaxDepthScale( this ),
17631768 u_ParallaxOffsetBias( this ),
1764- u_HeightMapInNormalMap( this ),
17651769 u_NormalScale( this ),
17661770 GLDeformStage( this ),
17671771 GLCompileMacro_USE_VERTEX_SKINNING( this ),
17681772 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1773+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
17691774 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
17701775 GLCompileMacro_USE_SHADOWING( this )
17711776{
@@ -1803,6 +1808,7 @@ void GLShader_forwardLighting_directionalSun::SetShaderProgramUniforms( shaderPr
18031808 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap2" ), 12 );
18041809 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap3" ), 13 );
18051810 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap4" ), 14 );
1811+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
18061812}
18071813
18081814GLShader_shadowFill::GLShader_shadowFill ( GLShaderManager *manager ) :
@@ -1843,12 +1849,12 @@ GLShader_reflection::GLShader_reflection( GLShaderManager *manager ):
18431849 u_Bones( this ),
18441850 u_ParallaxDepthScale( this ),
18451851 u_ParallaxOffsetBias( this ),
1846- u_HeightMapInNormalMap( this ),
18471852 u_NormalScale( this ),
18481853 u_VertexInterpolation( this ),
18491854 GLDeformStage( this ),
18501855 GLCompileMacro_USE_VERTEX_SKINNING( this ),
18511856 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1857+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
18521858 GLCompileMacro_USE_PARALLAX_MAPPING( this )
18531859{
18541860}
@@ -1871,6 +1877,7 @@ void GLShader_reflection::SetShaderProgramUniforms( shaderProgram_t *shaderProgr
18711877{
18721878 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ColorMap" ), 0 );
18731879 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_NormalMap" ), 1 );
1880+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
18741881}
18751882
18761883GLShader_skybox::GLShader_skybox ( GLShaderManager *manager ) :
@@ -1969,6 +1976,7 @@ void GLShader_heatHaze::SetShaderProgramUniforms( shaderProgram_t *shaderProgram
19691976{
19701977 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_NormalMap" ), 0 );
19711978 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_CurrentMap" ), 1 );
1979+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
19721980}
19731981
19741982GLShader_screen::GLShader_screen ( GLShaderManager *manager ) :
@@ -2108,13 +2116,13 @@ GLShader_liquid::GLShader_liquid( GLShaderManager *manager ) :
21082116 u_FresnelBias( this ),
21092117 u_ParallaxDepthScale( this ),
21102118 u_ParallaxOffsetBias( this ),
2111- u_HeightMapInNormalMap( this ),
21122119 u_NormalScale( this ),
21132120 u_FogDensity( this ),
21142121 u_FogColor( this ),
21152122 u_SpecularExponent( this ),
21162123 u_LightGridOrigin( this ),
21172124 u_LightGridScale( this ),
2125+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
21182126 GLCompileMacro_USE_PARALLAX_MAPPING( this )
21192127{
21202128}
@@ -2132,6 +2140,7 @@ void GLShader_liquid::SetShaderProgramUniforms( shaderProgram_t *shaderProgram )
21322140 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_NormalMap" ), 3 );
21332141 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_LightGrid1" ), 6 );
21342142 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_LightGrid2" ), 7 );
2143+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
21352144}
21362145
21372146GLShader_volumetricFog::GLShader_volumetricFog ( GLShaderManager *manager ) :
0 commit comments