Commit d128dae3 authored by NiranV's avatar NiranV

Fixed: Deferred Rendering failing when SSR is enabled but everything else is disabled.

parent c031e61f
......@@ -132,9 +132,6 @@ void main()
vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
scol_ambocc = pow(scol_ambocc, vec2(light_gamma));
vec3 color = vec3(0);
float bloom = 0.0;
{
......@@ -165,6 +162,10 @@ void main()
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
#if USE_SSR
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
scol_ambocc = pow(scol_ambocc, vec2(light_gamma));
float scol = max(scol_ambocc.r, diffuse.a);
if (spec.a > 0.0) // specular reflection
{
float fullbrightification = diffuse.a;
......
......@@ -220,6 +220,7 @@ BOOL LLPipeline::RenderDeferredBlurLight;
BOOL LLPipeline::RenderSnapshotAutoAdjustMultiplier;
BOOL LLPipeline::RenderHighPrecisionNormals;
BOOL LLPipeline::RenderShadowAutomaticDistance;
BOOL LLPipeline::RenderScreenSpaceReflections;
U32 LLPipeline::RenderSSRResolution;
F32 LLPipeline::RenderSSRBrightness;
F32 LLPipeline::RenderSSAOBlurSize;
......@@ -659,6 +660,7 @@ void LLPipeline::init()
gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
//BD - Screen Space Reflections
connectRefreshCachedSettingsSafe("RenderScreenSpaceReflections");
connectRefreshCachedSettingsSafe("RenderSSRResolution");
connectRefreshCachedSettingsSafe("RenderSSRBrightness");
......@@ -1344,6 +1346,7 @@ void LLPipeline::refreshCachedSettings()
RenderShadowResolution = gSavedSettings.getVector4("RenderShadowResolution");
// //BD - Screen Space Reflections
RenderScreenSpaceReflections = gSavedSettings.getBOOL("RenderScreenSpaceReflections");
RenderSSRResolution = gSavedSettings.getU32("RenderSSRResolution");
RenderSSRBrightness = gSavedSettings.getF32("RenderSSRBrightness");
......@@ -4230,7 +4233,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (facep)
{
gPipeline.mSelectedFaces.push_back(facep);
}
}
}
return true;
}
......@@ -8998,7 +9001,8 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target)
//BD
if (RenderDeferredSSAO
|| RenderShadowDetail > 0
|| RenderDeferredBlurLight)
|| RenderDeferredBlurLight
|| RenderScreenSpaceReflections)
{
deferred_light_target->bindTarget();
{ // paint shadow/SSAO light map (direct lighting lightmap)
......
......@@ -986,6 +986,7 @@ class LLPipeline
static BOOL RenderSnapshotAutoAdjustMultiplier;
static BOOL RenderHighPrecisionNormals;
static BOOL RenderShadowAutomaticDistance;
static BOOL RenderScreenSpaceReflections;
static U32 RenderSSRResolution;
static F32 RenderSSRBrightness;
static F32 RenderSSAOBlurSize;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment