@@ -231,7 +231,7 @@ void OnEnable()
231231 }
232232
233233 Matrix4x4 sizeOffset = Matrix4x4 . Translate ( decalOffset ) * Matrix4x4 . Scale ( decalSize ) ;
234- m_Handle = DecalSystem . instance . AddDecal ( position , rotation , Vector3 . one , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Material , gameObject . layer , HDUtils . GetSceneCullingMaskFromGameObject ( gameObject ) , m_FadeFactor ) ;
234+ m_Handle = DecalSystem . instance . AddDecal ( position , rotation , Vector3 . one , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Material , gameObject . layer , m_FadeFactor ) ;
235235 m_OldMaterial = m_Material ;
236236
237237#if UNITY_EDITOR
@@ -253,7 +253,7 @@ void UpdateDecalVisibility()
253253 else if ( m_Handle == null )
254254 {
255255 Matrix4x4 sizeOffset = Matrix4x4 . Translate ( decalOffset ) * Matrix4x4 . Scale ( decalSize ) ;
256- m_Handle = DecalSystem . instance . AddDecal ( position , rotation , Vector3 . one , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Material , gameObject . layer , HDUtils . GetSceneCullingMaskFromGameObject ( gameObject ) , m_FadeFactor ) ;
256+ m_Handle = DecalSystem . instance . AddDecal ( position , rotation , Vector3 . one , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Material , gameObject . layer , m_FadeFactor ) ;
257257 }
258258 }
259259#endif
@@ -292,7 +292,7 @@ internal void OnValidate()
292292
293293 if ( m_Material != null )
294294 {
295- m_Handle = DecalSystem . instance . AddDecal ( position , rotation , Vector3 . one , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Material , gameObject . layer , HDUtils . GetSceneCullingMaskFromGameObject ( gameObject ) , m_FadeFactor ) ;
295+ m_Handle = DecalSystem . instance . AddDecal ( position , rotation , Vector3 . one , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Material , gameObject . layer , m_FadeFactor ) ;
296296
297297 if ( ! DecalSystem . IsHDRenderPipelineDecal ( m_Material . shader ) ) // non HDRP/decal shaders such as shader graph decal do not affect transparency
298298 {
@@ -310,7 +310,7 @@ internal void OnValidate()
310310 }
311311 else // no material change, just update whatever else changed
312312 {
313- DecalSystem . instance . UpdateCachedData ( position , rotation , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Handle , gameObject . layer , HDUtils . GetSceneCullingMaskFromGameObject ( gameObject ) , m_FadeFactor ) ;
313+ DecalSystem . instance . UpdateCachedData ( position , rotation , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Handle , gameObject . layer , m_FadeFactor ) ;
314314 }
315315 }
316316 }
@@ -322,7 +322,7 @@ void Update() // only run in editor
322322 {
323323 Matrix4x4 sizeOffset = Matrix4x4 . Translate ( decalOffset ) * Matrix4x4 . Scale ( decalSize ) ;
324324 m_Layer = gameObject . layer ;
325- DecalSystem . instance . UpdateCachedData ( position , rotation , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Handle , gameObject . layer , HDUtils . GetSceneCullingMaskFromGameObject ( gameObject ) , m_FadeFactor ) ;
325+ DecalSystem . instance . UpdateCachedData ( position , rotation , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Handle , gameObject . layer , m_FadeFactor ) ;
326326 }
327327 }
328328#endif
@@ -334,7 +334,7 @@ void LateUpdate()
334334 if ( transform . hasChanged == true )
335335 {
336336 Matrix4x4 sizeOffset = Matrix4x4 . Translate ( decalOffset ) * Matrix4x4 . Scale ( decalSize ) ;
337- DecalSystem . instance . UpdateCachedData ( position , rotation , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Handle , gameObject . layer , HDUtils . GetSceneCullingMaskFromGameObject ( gameObject ) , m_FadeFactor ) ;
337+ DecalSystem . instance . UpdateCachedData ( position , rotation , sizeOffset , m_DrawDistance , m_FadeScale , uvScaleBias , m_AffectsTransparency , m_Handle , gameObject . layer , m_FadeFactor ) ;
338338 transform . hasChanged = false ;
339339 }
340340 }
0 commit comments