Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed HDRP build issues with DOTS_INSTANCING_ON shader variant.
- Fixed default value of "Distortion Blur" from 1 to 0 according to the doc.
- Fixed Transparent Depth Pre/Post pass by default for the built-in HDRP Hair shader graph.
- Fixed auto-exposure mismatch between sky background and scene objects in path tracing (case 1385131).

## [13.1.2] - 2021-11-05

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,15 @@ void RenderSky(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle skyBuff
passData.skyManager = m_SkyManager;

builder.SetRenderFunc(
(RenderSkyPassData data, RenderGraphContext context) =>
(RenderSkyPassData data, RenderGraphContext ctx) =>
{
data.skyManager.RenderSky(data.hdCamera, data.sunLight, data.colorBuffer, data.depthTexture, data.debugDisplaySettings, context.cmd);
// Override the exposure texture, as we need a neutral value for this render
ctx.cmd.SetGlobalTexture(HDShaderIDs._ExposureTexture, m_EmptyExposureTexture);

data.skyManager.RenderSky(data.hdCamera, data.sunLight, data.colorBuffer, data.depthTexture, data.debugDisplaySettings, ctx.cmd);

// Restore the regular exposure texture
ctx.cmd.SetGlobalTexture(HDShaderIDs._ExposureTexture, GetExposureTexture(hdCamera));
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void MissCamera(inout PathIntersection pathIntersection : SV_RayPayload)

bool skyEnabled = _EnvLightSkyEnabled && _RaytracingCameraSkyEnabled;
float4 missColor = skyEnabled ? _SkyCameraTexture[COORD_TEXTURE2D_X(pathIntersection.pixelCoord)] : _RaytracingCameraClearColor;
pathIntersection.value = missColor.rgb * GetInverseCurrentExposureMultiplier();
pathIntersection.value = missColor.rgb;
pathIntersection.alpha = missColor.a;

ApplyFogAttenuation(WorldRayOrigin(), WorldRayDirection(), pathIntersection.value, pathIntersection.alpha);
Expand Down