@@ -64,9 +64,6 @@ GLShader_generic *gl_genericShader = nullptr;
6464GLShader_genericMaterial *gl_genericShaderMaterial = nullptr ;
6565GLShader_lightMapping *gl_lightMappingShader = nullptr ;
6666GLShader_lightMappingMaterial *gl_lightMappingShaderMaterial = nullptr ;
67- GLShader_forwardLighting_omniXYZ *gl_forwardLightingShader_omniXYZ = nullptr ;
68- GLShader_forwardLighting_projXYZ *gl_forwardLightingShader_projXYZ = nullptr ;
69- GLShader_forwardLighting_directionalSun *gl_forwardLightingShader_directionalSun = nullptr ;
7067GLShader_fogQuake3 *gl_fogQuake3Shader = nullptr ;
7168GLShader_fogQuake3Material *gl_fogQuake3ShaderMaterial = nullptr ;
7269GLShader_heatHaze *gl_heatHazeShader = nullptr ;
@@ -686,7 +683,6 @@ static std::string GenEngineConstants() {
686683 if ( glConfig2.realtimeLighting )
687684 {
688685 AddDefine ( str, " r_realtimeLighting" , 1 );
689- AddDefine ( str, " r_realtimeLightingRenderer" , r_realtimeLightingRenderer.Get () );
690686 }
691687
692688 if ( r_showNormalMaps->integer )
@@ -2553,160 +2549,6 @@ void GLShader_lightMappingMaterial::SetShaderProgramUniforms( ShaderProgramDescr
25532549 }
25542550}
25552551
2556- GLShader_forwardLighting_omniXYZ::GLShader_forwardLighting_omniXYZ ():
2557- GLShader( " forwardLighting_omniXYZ" , ATTR_POSITION | ATTR_TEXCOORD | ATTR_QTANGENT,
2558- false , " forwardLighting" , " forwardLighting" ),
2559- u_DiffuseMap( this ),
2560- u_NormalMap( this ),
2561- u_MaterialMap( this ),
2562- u_AttenuationMapXY( this ),
2563- u_AttenuationMapZ( this ),
2564- u_RandomMap( this ),
2565- u_HeightMap( this ),
2566- u_TextureMatrix( this ),
2567- u_SpecularExponent( this ),
2568- u_AlphaThreshold( this ),
2569- u_ColorModulateColorGen_Float( this ),
2570- u_ColorModulateColorGen_Uint( this ),
2571- u_Color_Float( this ),
2572- u_Color_Uint( this ),
2573- u_ViewOrigin( this ),
2574- u_LightOrigin( this ),
2575- u_LightColor( this ),
2576- u_LightRadius( this ),
2577- u_LightScale( this ),
2578- u_LightAttenuationMatrix( this ),
2579- u_ModelMatrix( this ),
2580- u_ModelViewProjectionMatrix( this ),
2581- u_Bones( this ),
2582- u_VertexInterpolation( this ),
2583- u_ReliefDepthScale( this ),
2584- u_ReliefOffsetBias( this ),
2585- u_NormalScale( this ),
2586- GLDeformStage( this ),
2587- GLCompileMacro_USE_VERTEX_SKINNING( this ),
2588- GLCompileMacro_USE_VERTEX_ANIMATION( this ),
2589- GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
2590- GLCompileMacro_USE_RELIEF_MAPPING( this )
2591- {
2592- }
2593-
2594- void GLShader_forwardLighting_omniXYZ::SetShaderProgramUniforms ( ShaderProgramDescriptor *shaderProgram )
2595- {
2596- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_DiffuseMap" ), 0 );
2597- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_NormalMap" ), 1 );
2598- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_MaterialMap" ), 2 );
2599- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_AttenuationMapXY" ), 3 );
2600- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_AttenuationMapZ" ), 4 );
2601- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_RandomMap" ), 6 );
2602- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_HeightMap" ), 15 );
2603- }
2604-
2605- GLShader_forwardLighting_projXYZ::GLShader_forwardLighting_projXYZ ():
2606- GLShader( " forwardLighting_projXYZ" , ATTR_POSITION | ATTR_TEXCOORD | ATTR_QTANGENT,
2607- false , " forwardLighting" , " forwardLighting" ),
2608- u_DiffuseMap( this ),
2609- u_NormalMap( this ),
2610- u_MaterialMap( this ),
2611- u_AttenuationMapXY( this ),
2612- u_AttenuationMapZ( this ),
2613- u_RandomMap( this ),
2614- u_HeightMap( this ),
2615- u_TextureMatrix( this ),
2616- u_SpecularExponent( this ),
2617- u_AlphaThreshold( this ),
2618- u_ColorModulateColorGen_Float( this ),
2619- u_ColorModulateColorGen_Uint( this ),
2620- u_Color_Float( this ),
2621- u_Color_Uint( this ),
2622- u_ViewOrigin( this ),
2623- u_LightOrigin( this ),
2624- u_LightColor( this ),
2625- u_LightRadius( this ),
2626- u_LightScale( this ),
2627- u_LightAttenuationMatrix( this ),
2628- u_ModelMatrix( this ),
2629- u_ModelViewProjectionMatrix( this ),
2630- u_Bones( this ),
2631- u_VertexInterpolation( this ),
2632- u_ReliefDepthScale( this ),
2633- u_ReliefOffsetBias( this ),
2634- u_NormalScale( this ),
2635- GLDeformStage( this ),
2636- GLCompileMacro_USE_VERTEX_SKINNING( this ),
2637- GLCompileMacro_USE_VERTEX_ANIMATION( this ),
2638- GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
2639- GLCompileMacro_USE_RELIEF_MAPPING( this )
2640- {
2641- }
2642-
2643- void GLShader_forwardLighting_projXYZ::BuildShaderCompileMacros ( std::string& compileMacros )
2644- {
2645- compileMacros += " LIGHT_PROJ " ;
2646- }
2647-
2648- void GLShader_forwardLighting_projXYZ::SetShaderProgramUniforms ( ShaderProgramDescriptor *shaderProgram )
2649- {
2650- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_DiffuseMap" ), 0 );
2651- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_NormalMap" ), 1 );
2652- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_MaterialMap" ), 2 );
2653- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_AttenuationMapXY" ), 3 );
2654- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_AttenuationMapZ" ), 4 );
2655- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_RandomMap" ), 6 );
2656- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_HeightMap" ), 15 );
2657- }
2658-
2659- GLShader_forwardLighting_directionalSun::GLShader_forwardLighting_directionalSun ():
2660- GLShader( " forwardLighting_directionalSun" , ATTR_POSITION | ATTR_TEXCOORD | ATTR_QTANGENT,
2661- false , " forwardLighting" , " forwardLighting" ),
2662- u_DiffuseMap( this ),
2663- u_NormalMap( this ),
2664- u_MaterialMap( this ),
2665- u_HeightMap( this ),
2666- u_TextureMatrix( this ),
2667- u_SpecularExponent( this ),
2668- u_AlphaThreshold( this ),
2669- u_ColorModulateColorGen_Float( this ),
2670- u_ColorModulateColorGen_Uint( this ),
2671- u_Color_Float( this ),
2672- u_Color_Uint( this ),
2673- u_ViewOrigin( this ),
2674- u_LightDir( this ),
2675- u_LightColor( this ),
2676- u_LightRadius( this ),
2677- u_LightScale( this ),
2678- u_LightAttenuationMatrix( this ),
2679- u_ModelMatrix( this ),
2680- u_ViewMatrix( this ),
2681- u_ModelViewProjectionMatrix( this ),
2682- u_Bones( this ),
2683- u_VertexInterpolation( this ),
2684- u_ReliefDepthScale( this ),
2685- u_ReliefOffsetBias( this ),
2686- u_NormalScale( this ),
2687- GLDeformStage( this ),
2688- GLCompileMacro_USE_VERTEX_SKINNING( this ),
2689- GLCompileMacro_USE_VERTEX_ANIMATION( this ),
2690- GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
2691- GLCompileMacro_USE_RELIEF_MAPPING( this )
2692- {
2693- }
2694-
2695- void GLShader_forwardLighting_directionalSun::BuildShaderCompileMacros ( std::string& compileMacros )
2696- {
2697- compileMacros += " LIGHT_DIRECTIONAL " ;
2698- }
2699-
2700- void GLShader_forwardLighting_directionalSun::SetShaderProgramUniforms ( ShaderProgramDescriptor *shaderProgram )
2701- {
2702- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_DiffuseMap" ), 0 );
2703- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_NormalMap" ), 1 );
2704- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_MaterialMap" ), 2 );
2705- // glUniform1i(glGetUniformLocation( shaderProgram->id, "u_AttenuationMapXY" ), 3);
2706- // glUniform1i(glGetUniformLocation( shaderProgram->id, "u_AttenuationMapZ" ), 4);
2707- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_HeightMap" ), 15 );
2708- }
2709-
27102552GLShader_reflection::GLShader_reflection ():
27112553 GLShader( " reflection" , ATTR_POSITION | ATTR_TEXCOORD | ATTR_QTANGENT,
27122554 false , " reflection_CB" , " reflection_CB" ),
0 commit comments