@@ -1461,12 +1461,12 @@ GLShader_lightMapping::GLShader_lightMapping( GLShaderManager *manager ) :
14611461 u_ModelViewProjectionMatrix( this ),
14621462 u_ParallaxDepthScale( this ),
14631463 u_ParallaxOffsetBias( this ),
1464- u_HeightMapInNormalMap( this ),
14651464 u_NormalScale( this ),
14661465 u_numLights( this ),
14671466 u_Lights( this ),
14681467 GLDeformStage( this ),
14691468 GLCompileMacro_USE_DELUXE_MAPPING( this ),
1469+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
14701470 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
14711471 GLCompileMacro_USE_PHYSICAL_SHADING( this )
14721472{
@@ -1498,6 +1498,7 @@ void GLShader_lightMapping::SetShaderProgramUniforms( shaderProgram_t *shaderPro
14981498 if ( !glConfig2.uniformBufferObjectAvailable ) {
14991499 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_Lights" ), 9 );
15001500 }
1501+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
15011502}
15021503
15031504GLShader_vertexLighting_DBS_entity::GLShader_vertexLighting_DBS_entity ( GLShaderManager *manager ) :
@@ -1512,7 +1513,6 @@ GLShader_vertexLighting_DBS_entity::GLShader_vertexLighting_DBS_entity( GLShader
15121513 u_VertexInterpolation( this ),
15131514 u_ParallaxDepthScale( this ),
15141515 u_ParallaxOffsetBias( this ),
1515- u_HeightMapInNormalMap( this ),
15161516 u_NormalScale( this ),
15171517 u_EnvironmentInterpolation( this ),
15181518 u_LightGridOrigin( this ),
@@ -1522,6 +1522,7 @@ GLShader_vertexLighting_DBS_entity::GLShader_vertexLighting_DBS_entity( GLShader
15221522 GLDeformStage( this ),
15231523 GLCompileMacro_USE_VERTEX_SKINNING( this ),
15241524 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1525+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
15251526 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
15261527 GLCompileMacro_USE_REFLECTIVE_SPECULAR( this ),
15271528 GLCompileMacro_USE_PHYSICAL_SHADING( this )
@@ -1556,6 +1557,7 @@ void GLShader_vertexLighting_DBS_entity::SetShaderProgramUniforms( shaderProgram
15561557 if ( !glConfig2.uniformBufferObjectAvailable ) {
15571558 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_Lights" ), 9 );
15581559 }
1560+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
15591561}
15601562
15611563GLShader_vertexLighting_DBS_world::GLShader_vertexLighting_DBS_world ( GLShaderManager *manager ) :
@@ -1573,14 +1575,14 @@ GLShader_vertexLighting_DBS_world::GLShader_vertexLighting_DBS_world( GLShaderMa
15731575 u_ModelViewProjectionMatrix( this ),
15741576 u_ParallaxDepthScale( this ),
15751577 u_ParallaxOffsetBias( this ),
1576- u_HeightMapInNormalMap( this ),
15771578 u_NormalScale( this ),
15781579 u_LightWrapAround( this ),
15791580 u_LightGridOrigin( this ),
15801581 u_LightGridScale( this ),
15811582 u_numLights( this ),
15821583 u_Lights( this ),
15831584 GLDeformStage( this ),
1585+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
15841586 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
15851587 GLCompileMacro_USE_PHYSICAL_SHADING( this )
15861588{
@@ -1611,6 +1613,7 @@ void GLShader_vertexLighting_DBS_world::SetShaderProgramUniforms( shaderProgram_
16111613 if ( !glConfig2.uniformBufferObjectAvailable ) {
16121614 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_Lights" ), 9 );
16131615 }
1616+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
16141617}
16151618
16161619GLShader_forwardLighting_omniXYZ::GLShader_forwardLighting_omniXYZ ( GLShaderManager *manager ):
@@ -1635,11 +1638,11 @@ GLShader_forwardLighting_omniXYZ::GLShader_forwardLighting_omniXYZ( GLShaderMana
16351638 u_VertexInterpolation( this ),
16361639 u_ParallaxDepthScale( this ),
16371640 u_ParallaxOffsetBias( this ),
1638- u_HeightMapInNormalMap( this ),
16391641 u_NormalScale( this ),
16401642 GLDeformStage( this ),
16411643 GLCompileMacro_USE_VERTEX_SKINNING( this ),
16421644 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1645+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
16431646 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
16441647 GLCompileMacro_USE_SHADOWING( this )
16451648{
@@ -1669,6 +1672,7 @@ void GLShader_forwardLighting_omniXYZ::SetShaderProgramUniforms( shaderProgram_t
16691672 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowMap" ), 5 );
16701673 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_RandomMap" ), 6 );
16711674 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap" ), 7 );
1675+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
16721676}
16731677
16741678GLShader_forwardLighting_projXYZ::GLShader_forwardLighting_projXYZ ( GLShaderManager *manager ):
@@ -1694,11 +1698,11 @@ GLShader_forwardLighting_projXYZ::GLShader_forwardLighting_projXYZ( GLShaderMana
16941698 u_VertexInterpolation( this ),
16951699 u_ParallaxDepthScale( this ),
16961700 u_ParallaxOffsetBias( this ),
1697- u_HeightMapInNormalMap( this ),
16981701 u_NormalScale( this ),
16991702 GLDeformStage( this ),
17001703 GLCompileMacro_USE_VERTEX_SKINNING( this ),
17011704 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1705+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
17021706 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
17031707 GLCompileMacro_USE_SHADOWING( this )
17041708{
@@ -1729,6 +1733,7 @@ void GLShader_forwardLighting_projXYZ::SetShaderProgramUniforms( shaderProgram_t
17291733 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowMap0" ), 5 );
17301734 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_RandomMap" ), 6 );
17311735 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap0" ), 7 );
1736+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
17321737}
17331738
17341739GLShader_forwardLighting_directionalSun::GLShader_forwardLighting_directionalSun ( GLShaderManager *manager ):
@@ -1756,11 +1761,11 @@ GLShader_forwardLighting_directionalSun::GLShader_forwardLighting_directionalSun
17561761 u_VertexInterpolation( this ),
17571762 u_ParallaxDepthScale( this ),
17581763 u_ParallaxOffsetBias( this ),
1759- u_HeightMapInNormalMap( this ),
17601764 u_NormalScale( this ),
17611765 GLDeformStage( this ),
17621766 GLCompileMacro_USE_VERTEX_SKINNING( this ),
17631767 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1768+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
17641769 GLCompileMacro_USE_PARALLAX_MAPPING( this ),
17651770 GLCompileMacro_USE_SHADOWING( this )
17661771{
@@ -1798,6 +1803,7 @@ void GLShader_forwardLighting_directionalSun::SetShaderProgramUniforms( shaderPr
17981803 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap2" ), 12 );
17991804 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap3" ), 13 );
18001805 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ShadowClipMap4" ), 14 );
1806+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
18011807}
18021808
18031809GLShader_shadowFill::GLShader_shadowFill ( GLShaderManager *manager ) :
@@ -1838,12 +1844,12 @@ GLShader_reflection::GLShader_reflection( GLShaderManager *manager ):
18381844 u_Bones( this ),
18391845 u_ParallaxDepthScale( this ),
18401846 u_ParallaxOffsetBias( this ),
1841- u_HeightMapInNormalMap( this ),
18421847 u_NormalScale( this ),
18431848 u_VertexInterpolation( this ),
18441849 GLDeformStage( this ),
18451850 GLCompileMacro_USE_VERTEX_SKINNING( this ),
18461851 GLCompileMacro_USE_VERTEX_ANIMATION( this ),
1852+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
18471853 GLCompileMacro_USE_PARALLAX_MAPPING( this )
18481854{
18491855}
@@ -1866,6 +1872,7 @@ void GLShader_reflection::SetShaderProgramUniforms( shaderProgram_t *shaderProgr
18661872{
18671873 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_ColorMap" ), 0 );
18681874 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_NormalMap" ), 1 );
1875+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
18691876}
18701877
18711878GLShader_skybox::GLShader_skybox ( GLShaderManager *manager ) :
@@ -1964,6 +1971,7 @@ void GLShader_heatHaze::SetShaderProgramUniforms( shaderProgram_t *shaderProgram
19641971{
19651972 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_NormalMap" ), 0 );
19661973 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_CurrentMap" ), 1 );
1974+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
19671975}
19681976
19691977GLShader_screen::GLShader_screen ( GLShaderManager *manager ) :
@@ -2103,13 +2111,13 @@ GLShader_liquid::GLShader_liquid( GLShaderManager *manager ) :
21032111 u_FresnelBias( this ),
21042112 u_ParallaxDepthScale( this ),
21052113 u_ParallaxOffsetBias( this ),
2106- u_HeightMapInNormalMap( this ),
21072114 u_NormalScale( this ),
21082115 u_FogDensity( this ),
21092116 u_FogColor( this ),
21102117 u_SpecularExponent( this ),
21112118 u_LightGridOrigin( this ),
21122119 u_LightGridScale( this ),
2120+ GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
21132121 GLCompileMacro_USE_PARALLAX_MAPPING( this )
21142122{
21152123}
@@ -2127,6 +2135,7 @@ void GLShader_liquid::SetShaderProgramUniforms( shaderProgram_t *shaderProgram )
21272135 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_NormalMap" ), 3 );
21282136 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_LightGrid1" ), 6 );
21292137 glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_LightGrid2" ), 7 );
2138+ glUniform1i ( glGetUniformLocation ( shaderProgram->program , " u_HeightMap" ), 15 );
21302139}
21312140
21322141GLShader_volumetricFog::GLShader_volumetricFog ( GLShaderManager *manager ) :
0 commit comments