@@ -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 ;
@@ -691,7 +688,6 @@ static std::string GenEngineConstants() {
691688 if ( glConfig2.realtimeLighting )
692689 {
693690 AddDefine ( str, " r_realtimeLighting" , 1 );
694- AddDefine ( str, " r_realtimeLightingRenderer" , r_realtimeLightingRenderer.Get () );
695691 }
696692
697693 if ( r_showNormalMaps->integer )
@@ -2558,160 +2554,6 @@ void GLShader_lightMappingMaterial::SetShaderProgramUniforms( ShaderProgramDescr
25582554 }
25592555}
25602556
2561- GLShader_forwardLighting_omniXYZ::GLShader_forwardLighting_omniXYZ ():
2562- GLShader( " forwardLighting_omniXYZ" , ATTR_POSITION | ATTR_TEXCOORD | ATTR_QTANGENT,
2563- false , " forwardLighting" , " forwardLighting" ),
2564- u_DiffuseMap( this ),
2565- u_NormalMap( this ),
2566- u_MaterialMap( this ),
2567- u_AttenuationMapXY( this ),
2568- u_AttenuationMapZ( this ),
2569- u_RandomMap( this ),
2570- u_HeightMap( this ),
2571- u_TextureMatrix( this ),
2572- u_SpecularExponent( this ),
2573- u_AlphaThreshold( this ),
2574- u_ColorModulateColorGen_Float( this ),
2575- u_ColorModulateColorGen_Uint( this ),
2576- u_Color_Float( this ),
2577- u_Color_Uint( this ),
2578- u_ViewOrigin( this ),
2579- u_LightOrigin( this ),
2580- u_LightColor( this ),
2581- u_LightRadius( this ),
2582- u_LightScale( this ),
2583- u_LightAttenuationMatrix( this ),
2584- u_ModelMatrix( this ),
2585- u_ModelViewProjectionMatrix( this ),
2586- u_Bones( this ),
2587- u_VertexInterpolation( this ),
2588- u_ReliefDepthScale( this ),
2589- u_ReliefOffsetBias( this ),
2590- u_NormalScale( this ),
2591- GLDeformStage( this ),
2592- GLCompileMacro_USE_VERTEX_SKINNING( this ),
2593- GLCompileMacro_USE_VERTEX_ANIMATION( this ),
2594- GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
2595- GLCompileMacro_USE_RELIEF_MAPPING( this )
2596- {
2597- }
2598-
2599- void GLShader_forwardLighting_omniXYZ::SetShaderProgramUniforms ( ShaderProgramDescriptor *shaderProgram )
2600- {
2601- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_DiffuseMap" ), 0 );
2602- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_NormalMap" ), 1 );
2603- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_MaterialMap" ), 2 );
2604- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_AttenuationMapXY" ), 3 );
2605- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_AttenuationMapZ" ), 4 );
2606- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_RandomMap" ), 6 );
2607- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_HeightMap" ), 15 );
2608- }
2609-
2610- GLShader_forwardLighting_projXYZ::GLShader_forwardLighting_projXYZ ():
2611- GLShader( " forwardLighting_projXYZ" , ATTR_POSITION | ATTR_TEXCOORD | ATTR_QTANGENT,
2612- false , " forwardLighting" , " forwardLighting" ),
2613- u_DiffuseMap( this ),
2614- u_NormalMap( this ),
2615- u_MaterialMap( this ),
2616- u_AttenuationMapXY( this ),
2617- u_AttenuationMapZ( this ),
2618- u_RandomMap( this ),
2619- u_HeightMap( this ),
2620- u_TextureMatrix( this ),
2621- u_SpecularExponent( this ),
2622- u_AlphaThreshold( this ),
2623- u_ColorModulateColorGen_Float( this ),
2624- u_ColorModulateColorGen_Uint( this ),
2625- u_Color_Float( this ),
2626- u_Color_Uint( this ),
2627- u_ViewOrigin( this ),
2628- u_LightOrigin( this ),
2629- u_LightColor( this ),
2630- u_LightRadius( this ),
2631- u_LightScale( this ),
2632- u_LightAttenuationMatrix( this ),
2633- u_ModelMatrix( this ),
2634- u_ModelViewProjectionMatrix( this ),
2635- u_Bones( this ),
2636- u_VertexInterpolation( this ),
2637- u_ReliefDepthScale( this ),
2638- u_ReliefOffsetBias( this ),
2639- u_NormalScale( this ),
2640- GLDeformStage( this ),
2641- GLCompileMacro_USE_VERTEX_SKINNING( this ),
2642- GLCompileMacro_USE_VERTEX_ANIMATION( this ),
2643- GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
2644- GLCompileMacro_USE_RELIEF_MAPPING( this )
2645- {
2646- }
2647-
2648- void GLShader_forwardLighting_projXYZ::BuildShaderCompileMacros ( std::string& compileMacros )
2649- {
2650- compileMacros += " LIGHT_PROJ " ;
2651- }
2652-
2653- void GLShader_forwardLighting_projXYZ::SetShaderProgramUniforms ( ShaderProgramDescriptor *shaderProgram )
2654- {
2655- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_DiffuseMap" ), 0 );
2656- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_NormalMap" ), 1 );
2657- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_MaterialMap" ), 2 );
2658- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_AttenuationMapXY" ), 3 );
2659- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_AttenuationMapZ" ), 4 );
2660- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_RandomMap" ), 6 );
2661- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_HeightMap" ), 15 );
2662- }
2663-
2664- GLShader_forwardLighting_directionalSun::GLShader_forwardLighting_directionalSun ():
2665- GLShader( " forwardLighting_directionalSun" , ATTR_POSITION | ATTR_TEXCOORD | ATTR_QTANGENT,
2666- false , " forwardLighting" , " forwardLighting" ),
2667- u_DiffuseMap( this ),
2668- u_NormalMap( this ),
2669- u_MaterialMap( this ),
2670- u_HeightMap( this ),
2671- u_TextureMatrix( this ),
2672- u_SpecularExponent( this ),
2673- u_AlphaThreshold( this ),
2674- u_ColorModulateColorGen_Float( this ),
2675- u_ColorModulateColorGen_Uint( this ),
2676- u_Color_Float( this ),
2677- u_Color_Uint( this ),
2678- u_ViewOrigin( this ),
2679- u_LightDir( this ),
2680- u_LightColor( this ),
2681- u_LightRadius( this ),
2682- u_LightScale( this ),
2683- u_LightAttenuationMatrix( this ),
2684- u_ModelMatrix( this ),
2685- u_ViewMatrix( this ),
2686- u_ModelViewProjectionMatrix( this ),
2687- u_Bones( this ),
2688- u_VertexInterpolation( this ),
2689- u_ReliefDepthScale( this ),
2690- u_ReliefOffsetBias( this ),
2691- u_NormalScale( this ),
2692- GLDeformStage( this ),
2693- GLCompileMacro_USE_VERTEX_SKINNING( this ),
2694- GLCompileMacro_USE_VERTEX_ANIMATION( this ),
2695- GLCompileMacro_USE_HEIGHTMAP_IN_NORMALMAP( this ),
2696- GLCompileMacro_USE_RELIEF_MAPPING( this )
2697- {
2698- }
2699-
2700- void GLShader_forwardLighting_directionalSun::BuildShaderCompileMacros ( std::string& compileMacros )
2701- {
2702- compileMacros += " LIGHT_DIRECTIONAL " ;
2703- }
2704-
2705- void GLShader_forwardLighting_directionalSun::SetShaderProgramUniforms ( ShaderProgramDescriptor *shaderProgram )
2706- {
2707- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_DiffuseMap" ), 0 );
2708- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_NormalMap" ), 1 );
2709- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_MaterialMap" ), 2 );
2710- // glUniform1i(glGetUniformLocation( shaderProgram->id, "u_AttenuationMapXY" ), 3);
2711- // glUniform1i(glGetUniformLocation( shaderProgram->id, "u_AttenuationMapZ" ), 4);
2712- glUniform1i ( glGetUniformLocation ( shaderProgram->id , " u_HeightMap" ), 15 );
2713- }
2714-
27152557GLShader_reflection::GLShader_reflection ():
27162558 GLShader( " reflection" , ATTR_POSITION | ATTR_TEXCOORD | ATTR_QTANGENT,
27172559 false , " reflection_CB" , " reflection_CB" ),
0 commit comments