@@ -158,6 +158,7 @@ LLGLSLShader gDeferredMultiLightProgram[16];
158
158
LLGLSLShader gDeferredSpotLightProgram ;
159
159
LLGLSLShader gDeferredMultiSpotLightProgram ;
160
160
LLGLSLShader gDeferredSunProgram ;
161
+ LLGLSLShader gDeferredSunProbeProgram ;
161
162
LLGLSLShader gHazeProgram ;
162
163
LLGLSLShader gHazeWaterProgram ;
163
164
LLGLSLShader gDeferredBlurLightProgram ;
@@ -400,6 +401,7 @@ void LLViewerShaderMgr::finalizeShaderList()
400
401
mShaderList .push_back (&gObjectAlphaMaskNoColorProgram );
401
402
mShaderList .push_back (&gUnderWaterProgram );
402
403
mShaderList .push_back (&gDeferredSunProgram );
404
+ mShaderList .push_back (&gDeferredSunProbeProgram );
403
405
mShaderList .push_back (&gHazeProgram );
404
406
mShaderList .push_back (&gHazeWaterProgram );
405
407
mShaderList .push_back (&gDeferredSoftenProgram );
@@ -1600,21 +1602,14 @@ bool LLViewerShaderMgr::loadShadersDeferred()
1600
1602
if (success)
1601
1603
{
1602
1604
std::string fragment;
1603
- std::string vertex = " deferred/sunLightV.glsl" ;
1604
-
1605
1605
bool use_ao = gSavedSettings .getBOOL (" RenderDeferredSSAO" );
1606
-
1607
1606
if (use_ao)
1608
1607
{
1609
1608
fragment = " deferred/sunLightSSAOF.glsl" ;
1610
1609
}
1611
1610
else
1612
1611
{
1613
1612
fragment = " deferred/sunLightF.glsl" ;
1614
- if (mShaderLevel [SHADER_DEFERRED] == 1 )
1615
- { // no shadows, no SSAO, no frag coord
1616
- vertex = " deferred/sunLightNoFragCoordV.glsl" ;
1617
- }
1618
1613
}
1619
1614
1620
1615
gDeferredSunProgram .mName = " Deferred Sun Shader" ;
@@ -1623,14 +1618,29 @@ bool LLViewerShaderMgr::loadShadersDeferred()
1623
1618
gDeferredSunProgram .mFeatures .hasAmbientOcclusion = use_ao;
1624
1619
1625
1620
gDeferredSunProgram .mShaderFiles .clear ();
1626
- gDeferredSunProgram .mShaderFiles .push_back (make_pair (vertex , GL_VERTEX_SHADER));
1621
+ gDeferredSunProgram .mShaderFiles .push_back (make_pair (" deferred/sunLightV.glsl " , GL_VERTEX_SHADER));
1627
1622
gDeferredSunProgram .mShaderFiles .push_back (make_pair (fragment, GL_FRAGMENT_SHADER));
1628
1623
gDeferredSunProgram .mShaderLevel = mShaderLevel [SHADER_DEFERRED];
1629
1624
1630
1625
success = gDeferredSunProgram .createShader ();
1631
1626
llassert (success);
1632
1627
}
1633
1628
1629
+ if (success)
1630
+ {
1631
+ gDeferredSunProbeProgram .mName = " Deferred Sun Probe Shader" ;
1632
+ gDeferredSunProbeProgram .mFeatures .isDeferred = true ;
1633
+ gDeferredSunProbeProgram .mFeatures .hasShadows = true ;
1634
+
1635
+ gDeferredSunProbeProgram .mShaderFiles .clear ();
1636
+ gDeferredSunProbeProgram .mShaderFiles .push_back (make_pair (" deferred/sunLightV.glsl" , GL_VERTEX_SHADER));
1637
+ gDeferredSunProbeProgram .mShaderFiles .push_back (make_pair (" deferred/sunLightF.glsl" , GL_FRAGMENT_SHADER));
1638
+ gDeferredSunProbeProgram .mShaderLevel = mShaderLevel [SHADER_DEFERRED];
1639
+
1640
+ success = gDeferredSunProbeProgram .createShader ();
1641
+ llassert (success);
1642
+ }
1643
+
1634
1644
if (success)
1635
1645
{
1636
1646
gDeferredBlurLightProgram .mName = " Deferred Blur Light Shader" ;
0 commit comments