Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -324,6 +324,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed a nullref in volume system after deleting a volume object (case 1348374).
- Fixed the APV UI loosing focus when the helpbox about baking appears in the probe volume.
- Fixed enabling a lensflare in playmode.
- Fixed white flashes when history is reset due to changes on type of upsampler.

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,8 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te
{
// Dynamic exposure - will be applied in the next frame
// Not considered as a post-process so it's not affected by its enabled state

TextureHandle exposureForImmediateApplication = TextureHandle.nullHandle;
if (!IsExposureFixed(hdCamera) && hdCamera.exposureControlFS)
{
using (var builder = renderGraph.AddRenderPass<DynamicExposureData>("Dynamic Exposure", out var passData, ProfilingSampler.Get(HDProfileId.DynamicExposure)))
Expand All @@ -1220,6 +1222,7 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te
{
DoHistogramBasedExposure(data, ctx.cmd);
});
exposureForImmediateApplication = passData.nextExposure;
}
else
{
Expand All @@ -1233,6 +1236,7 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te
{
DoDynamicExposure(data, ctx.cmd);
});
exposureForImmediateApplication = passData.nextExposure;
}
}

Expand All @@ -1248,18 +1252,14 @@ TextureHandle DynamicExposurePass(RenderGraph renderGraph, HDCamera hdCamera, Te
passData.height = hdCamera.actualHeight;
passData.viewCount = hdCamera.viewCount;
passData.source = builder.ReadTexture(source);
passData.prevExposure = builder.ReadTexture(renderGraph.ImportTexture(GetPreviousExposureTexture(hdCamera)));
passData.prevExposure = exposureForImmediateApplication;

TextureHandle dest = GetPostprocessOutputHandle(renderGraph, "Apply Exposure Destination");
passData.destination = builder.WriteTexture(dest);

builder.SetRenderFunc(
(ApplyExposureData data, RenderGraphContext ctx) =>
{
// Note: we use previous instead of current because the textures
// are swapped internally as the system expects the texture will be used
// on the next frame. So the actual "current" for this frame is in
// "previous".
ctx.cmd.SetComputeTextureParam(data.applyExposureCS, data.applyExposureKernel, HDShaderIDs._ExposureTexture, data.prevExposure);
ctx.cmd.SetComputeTextureParam(data.applyExposureCS, data.applyExposureKernel, HDShaderIDs._InputTexture, data.source);
ctx.cmd.SetComputeTextureParam(data.applyExposureCS, data.applyExposureKernel, HDShaderIDs._OutputTexture, data.destination);
Expand Down