Skip to content

Commit b4df4fe

Browse files
committed
renderer: add non-bitwise alternative for u_Color and u_ColorModulateColorGen
Add non-bitwise alternative for u_Color and u_ColorModulateColorGen, it is used on non-material system for compatibility with GLSL 1.20.
1 parent ed598c3 commit b4df4fe

10 files changed

Lines changed: 363 additions & 146 deletions

File tree

src/engine/renderer/gl_shader.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,8 +2265,8 @@ GLShader_generic::GLShader_generic( GLShaderManager *manager ) :
22652265
u_AlphaThreshold( this ),
22662266
u_ModelMatrix( this ),
22672267
u_ModelViewProjectionMatrix( this ),
2268-
u_ColorModulateColorGen( this ),
2269-
u_Color( this ),
2268+
u_ColorModulateColorGen_Float( this ),
2269+
u_Color_Float( this ),
22702270
u_Bones( this ),
22712271
u_VertexInterpolation( this ),
22722272
u_DepthScale( this ),
@@ -2297,8 +2297,8 @@ GLShader_genericMaterial::GLShader_genericMaterial( GLShaderManager* manager ) :
22972297
u_AlphaThreshold( this ),
22982298
u_ModelMatrix( this ),
22992299
u_ModelViewProjectionMatrix( this ),
2300-
u_ColorModulateColorGen( this ),
2301-
u_Color( this ),
2300+
u_ColorModulateColorGen_Uint( this ),
2301+
u_Color_Uint( this ),
23022302
u_DepthScale( this ),
23032303
u_ShowTris( this ),
23042304
u_MaterialColour( this ),
@@ -2332,8 +2332,8 @@ GLShader_lightMapping::GLShader_lightMapping( GLShaderManager *manager ) :
23322332
u_LightTiles( this ),
23332333
u_TextureMatrix( this ),
23342334
u_SpecularExponent( this ),
2335-
u_ColorModulateColorGen( this ),
2336-
u_Color( this ),
2335+
u_ColorModulateColorGen_Float( this ),
2336+
u_Color_Float( this ),
23372337
u_AlphaThreshold( this ),
23382338
u_ViewOrigin( this ),
23392339
u_ModelMatrix( this ),
@@ -2400,8 +2400,8 @@ GLShader_lightMappingMaterial::GLShader_lightMappingMaterial( GLShaderManager* m
24002400
u_LightTiles( this ),
24012401
u_TextureMatrix( this ),
24022402
u_SpecularExponent( this ),
2403-
u_ColorModulateColorGen( this ),
2404-
u_Color( this ),
2403+
u_ColorModulateColorGen_Uint( this ),
2404+
u_Color_Uint( this ),
24052405
u_AlphaThreshold( this ),
24062406
u_ViewOrigin( this ),
24072407
u_ModelMatrix( this ),
@@ -2459,8 +2459,8 @@ GLShader_forwardLighting_omniXYZ::GLShader_forwardLighting_omniXYZ( GLShaderMana
24592459
u_TextureMatrix( this ),
24602460
u_SpecularExponent( this ),
24612461
u_AlphaThreshold( this ),
2462-
u_ColorModulateColorGen( this ),
2463-
u_Color( this ),
2462+
u_ColorModulateColorGen_Float( this ),
2463+
u_Color_Float( this ),
24642464
u_ViewOrigin( this ),
24652465
u_LightOrigin( this ),
24662466
u_LightColor( this ),
@@ -2512,8 +2512,8 @@ GLShader_forwardLighting_projXYZ::GLShader_forwardLighting_projXYZ( GLShaderMana
25122512
u_TextureMatrix( this ),
25132513
u_SpecularExponent( this ),
25142514
u_AlphaThreshold( this ),
2515-
u_ColorModulateColorGen( this ),
2516-
u_Color( this ),
2515+
u_ColorModulateColorGen_Float( this ),
2516+
u_Color_Float( this ),
25172517
u_ViewOrigin( this ),
25182518
u_LightOrigin( this ),
25192519
u_LightColor( this ),
@@ -2576,8 +2576,8 @@ GLShader_forwardLighting_directionalSun::GLShader_forwardLighting_directionalSun
25762576
u_TextureMatrix( this ),
25772577
u_SpecularExponent( this ),
25782578
u_AlphaThreshold( this ),
2579-
u_ColorModulateColorGen( this ),
2580-
u_Color( this ),
2579+
u_ColorModulateColorGen_Float( this ),
2580+
u_Color_Float( this ),
25812581
u_ViewOrigin( this ),
25822582
u_LightDir( this ),
25832583
u_LightColor( this ),
@@ -2639,7 +2639,7 @@ GLShader_shadowFill::GLShader_shadowFill( GLShaderManager *manager ) :
26392639
u_LightRadius( this ),
26402640
u_ModelMatrix( this ),
26412641
u_ModelViewProjectionMatrix( this ),
2642-
u_Color( this ),
2642+
u_Color_Float( this ),
26432643
u_Bones( this ),
26442644
u_VertexInterpolation( this ),
26452645
GLDeformStage( this ),
@@ -2747,7 +2747,7 @@ GLShader_fogQuake3::GLShader_fogQuake3( GLShaderManager *manager ) :
27472747
u_FogMap( this ),
27482748
u_ModelMatrix( this ),
27492749
u_ModelViewProjectionMatrix( this ),
2750-
u_ColorGlobal( this ),
2750+
u_ColorGlobal_Float( this ),
27512751
u_Bones( this ),
27522752
u_VertexInterpolation( this ),
27532753
u_FogDistanceVector( this ),
@@ -2769,7 +2769,7 @@ GLShader_fogQuake3Material::GLShader_fogQuake3Material( GLShaderManager* manager
27692769
u_FogMap( this ),
27702770
u_ModelMatrix( this ),
27712771
u_ModelViewProjectionMatrix( this ),
2772-
u_ColorGlobal( this ),
2772+
u_ColorGlobal_Float( this ),
27732773
u_FogDistanceVector( this ),
27742774
u_FogDepthVector( this ),
27752775
u_FogEyeT( this ),
@@ -2786,7 +2786,7 @@ GLShader_fogGlobal::GLShader_fogGlobal( GLShaderManager *manager ) :
27862786
u_DepthMap( this ),
27872787
u_ModelViewProjectionMatrix( this ),
27882788
u_UnprojectMatrix( this ),
2789-
u_Color( this ),
2789+
u_Color_Float( this ),
27902790
u_FogDistanceVector( this )
27912791
{
27922792
}

0 commit comments

Comments
 (0)