Skip to content

Commit

Permalink
Fix custom pass normal and template (#2716)
Browse files Browse the repository at this point in the history
* Fix custom pass template not compiling

* Fix custom pass normal buffer not bound

* Updated changelog

* Update CHANGELOG.md

Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>
  • Loading branch information
alelievr and sebastienlagarde committed Nov 23, 2020
1 parent 60e5089 commit 29e7594
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed the sampling of the normal buffer in the the forward transparent pass.
- Fixed bloom prefiltering tooltip.
- Fixed NullReferenceException when loading multipel scene async
- Fixed missing alpha blend state properties in Axf sahder and update default stencil properties
- Fixed missing alpha blend state properties in Axf shader and update default stencil properties
- Fixed normal buffer not bound to custom pass anymore.

## [10.2.0] - 2020-10-19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Shader "Renderers/#SCRIPTNAME#"

// Write back the data to the output structures
ZERO_INITIALIZE(BuiltinData, builtinData); // No call to InitBuiltinData as we don't have any lighting
ZERO_INITIALIZE(SurfaceData, surfaceData);
builtinData.opacity = opacity;
builtinData.emissiveColor = float3(0, 0, 0);
surfaceData.color = color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ internal void ExecuteInternal(RenderGraph renderGraph, HDCamera hdCamera, Cullin
if (customPass.currentRenderTarget.motionVectorBufferRG.IsValid() && (customPass.injectionPoint == CustomPassInjectionPoint.BeforePostProcess || customPass.injectionPoint == CustomPassInjectionPoint.AfterPostProcess))
ctx.cmd.SetGlobalTexture(HDShaderIDs._CameraMotionVectorsTexture, customPass.currentRenderTarget.motionVectorBufferRG);
if (customPass.currentRenderTarget.normalBufferRG.IsValid() && customPass.injectionPoint != CustomPassInjectionPoint.AfterPostProcess)
ctx.cmd.SetGlobalTexture(HDShaderIDs._NormalBufferTexture, customPass.currentRenderTarget.normalBufferRG);
if (!customPass.isSetup)
{
customPass.Setup(ctx.renderContext, ctx.cmd);
Expand Down

0 comments on commit 29e7594

Please sign in to comment.