Skip to content

Commit 37524ea

Browse files
authored
Merge pull request #19 from grenappels/main
Update SimpleLitGBufferPass.hlsl
2 parents 1c0fc81 + 2e5571a commit 37524ea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Editor/ShaderGraph/Includes/SimpleLitGBufferPass.hlsl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,17 @@ FragmentOutput frag(PackedVaryings packedInput)
109109
#endif
110110

111111
#ifdef _DBUFFER
112+
// ApplyDecal needs modifiable values for metallic and occlusion
113+
// but they end up not being used, so feed them a throwaway value
114+
float throwaway = 0.0;
112115
ApplyDecal(unpacked.positionCS,
113116
surfaceDescription.BaseColor,
114117
specular,
115118
inputData.normalWS,
116119
/*metallic,*/
117-
0,
120+
throwaway,
118121
/*surfaceDescription.Occlusion,*/
119-
1,
122+
throwaway,
120123
surfaceDescription.Smoothness);
121124
#endif
122125

0 commit comments

Comments
 (0)