Skip to content

[Backport 7.x.x]] Fixed decal duplication when editing a prefab in context #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 103 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
ac93e17
[7.x.x Backport] Fixed a weird behavior in the scalable settings draw…
anisunity Apr 3, 2020
f4f74f1
Fixed an usage of a a compute buffer not bound (1229964) (#28)
sebastienlagarde Apr 7, 2020
5ddc5f7
Removed wrongly serialized fields in StaticLightingSky (#6441)
JulienIgnace-Unity Apr 3, 2020
5faae4d
Fix issues in the post process system with RenderTexture being invali…
sebastienlagarde Apr 7, 2020
3531a57
Update PostProcessSystem.cs
sebastienlagarde Apr 7, 2020
84b722d
Fixed an issue where changing the default volume profile from anothe…
JulienIgnace-Unity Apr 3, 2020
0cd0299
Hdrp/docs/glossary f number (#6523)
JordanL8 Apr 2, 2020
accff86
Clamp probes compression factor to 0 (#19)
FrancescoC-unity Apr 7, 2020
b754f52
path validation when creating new volume profile (#36)
sebastienlagarde Apr 7, 2020
aaf7bf5
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde Apr 8, 2020
bc7cc75
[Backport 7.x.x] Fix various leaks in HDRP (#120)
JulienIgnace-Unity Apr 15, 2020
359afb4
[7.x.x backport] Follow references when deleting unloading unused ass…
FrancescoC-unity Apr 15, 2020
9993a1c
[7.x.x Backport] Fixed an issue with the specularFGD term being used …
anisunity Apr 16, 2020
4f857b0
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde Apr 16, 2020
f4c7b7f
d Fix MSAA resolve when there is no motion vectors #1
adrien-de-tocqueville Apr 14, 2020
8cb689f
Fix issues causing planar probes to be broken with multiple cameras i…
FrancescoC-unity Apr 15, 2020
7d010f4
Pospow and SG triplanar fix #40
slunity Apr 8, 2020
4410bd1
Hdrp/fix/custom pass msaa rendering info #42
alelievr Apr 9, 2020
67e7c73
Added disocclusion and ghosting to the glossary (#75)
JordanL8 Apr 9, 2020
6e624d2
Update the scripting API for FrameSettings, FrameSettingsOverrideMask…
RSlysz Apr 16, 2020
bf34a59
fix switch shader compilation (#111)
sebastienlagarde Apr 14, 2020
417b5d1
Update SceneViewDrawMode.cs (#118)
sebastienlagarde Apr 14, 2020
dd03aa3
Fix culling of reflection probes that change position #121
pmavridis Apr 15, 2020
5111f69
Fix null reference when processing light probe #131
pmavridis Apr 15, 2020
61886f3
Fix black screen in XR when HDRP package is present but not used #137
fabien-unity Apr 15, 2020
9d9eb87
Fix default volume profile collapse #138
alelievr Apr 16, 2020
8c0e270
Fix for white flash happening when changing lighting condition (like …
sebastienlagarde Apr 16, 2020
5b4fce1
Added baked GI rp support caveat and made setting shadow filter quali…
JordanL8 Apr 16, 2020
ffc58cd
Update AxF-Shader.md (#152)
JordanL8 Apr 16, 2020
4f787c2
Bind missing buffer #159
victor-unity Apr 16, 2020
2b1b282
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde Apr 16, 2020
891160d
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde Apr 16, 2020
f3218d6
[Backport 7.x.x] Diffusion Profile and Material references in HDRP ma…
JulienIgnace-Unity Apr 20, 2020
976cd19
Catch and handle NRefactory parser exceptions #6392
sebastienlagarde Apr 24, 2020
ea70f9b
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde Apr 24, 2020
56ace1e
[7.x.x backport] Fix quality settings UI and shadow mask UI #122 (#123)
sebastienlagarde Apr 27, 2020
4f14500
Fixed the indirect diffuse texture not being ignored when it should (…
anisunity Apr 27, 2020
f1d45cf
[7.x.x Backport] Fix pre/post pass sg properties #82 (#85)
alelievr May 5, 2020
2f7ebef
Fixed a performance issue with stochastic ray traced area shadows. (#…
anisunity May 5, 2020
774383d
[Backport 7.x.x] Updated raytracing async compute warning. (#304)
JulienIgnace-Unity May 6, 2020
f5d67f1
[Backport 7.x.x] Fixed a null ref exception in static sky when the de…
JulienIgnace-Unity May 6, 2020
1731ded
[Backport 7.x.x] Fixed an error about procedural sky being logged by …
JulienIgnace-Unity May 6, 2020
6876810
[Backport 7.x.x] Fix flickering lighting in the scene and game view w…
JulienIgnace-Unity May 6, 2020
722d7b1
[7.x.x Backport] Fix issue with ambient probe not being correct with …
FrancescoC-unity May 6, 2020
c4bbd9f
[Backport 7.x.x] Fixed some gcalloc in the debug window (#464)
JulienIgnace-Unity May 14, 2020
b2117a4
[Backport 7.x.x] Hdrp/small ui update (#466)
JulienIgnace-Unity May 14, 2020
3903550
[Backport 7.x.x] PBR Sky renderer now shares its internal precomputat…
JulienIgnace-Unity May 14, 2020
762012c
[Backport 7.x.x] New tooltip for camera background and fixed exposure…
JulienIgnace-Unity May 14, 2020
eec0506
[Backport 7.x.x] Fixed asset preview being rendered white because of …
JulienIgnace-Unity May 14, 2020
5e4d82e
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde May 14, 2020
03dbd4d
Changed UI name, tooltip, and doc for maximum decals on screen (#232)
JordanL8 Apr 23, 2020
aac437e
Update Custom-Post-Process.md (#233)
JordanL8 Apr 24, 2020
fb68069
Update HDRP-Features.md (#235)
JordanL8 Apr 24, 2020
3216fdb
Hdrp/reflection probe scale perf #252
fredericv-unity3d May 7, 2020
122f942
HD: Switch to 1920x1080 default standalone resolution (#279)
aras-p Apr 27, 2020
f77e94a
Makes sure quaternion is normalized and valid before converting to ma…
eturquin May 14, 2020
2905dd0
Fix cookie srgb #297
alelievr May 6, 2020
e0c3e74
Updated forward and deferred rendering definitions (#350)
JordanL8 May 4, 2020
3795b34
Update Light-Component.md (#357)
JordanL8 May 14, 2020
a3dae38
Hd/add layer modification on generated emissive mesh for area light #364
RSlysz May 11, 2020
139c8c0
Update Look-Dev-Environment-Library.md (#365)
JordanL8 May 14, 2020
5fefa89
Update Volumetric-Lighting.md (#402)
JordanL8 May 11, 2020
e0ec69e
Hd/fix nullref while removing decal component #416
RSlysz May 12, 2020
2cb76f9
Fix issue with Uber Post process shader when alpha is enabled #422
FrancescoC-unity May 12, 2020
e457eba
Fix the bug (#430)
skhiat May 13, 2020
4a5c68b
Fix issue causing not all baked reflection probes to be deleted #441
FrancescoC-unity May 14, 2020
9f59d1d
Updated Decal Projector doc (#477)
JordanL8 May 14, 2020
51a5ed3
Look Dev docs refactor 2 #484
JordanL8 May 14, 2020
6529107
[7.x.x Backport] Fix issue with corrupted values with Layer Lit when …
FrancescoC-unity May 14, 2020
e69b21e
Fix Motion Vectors written by transparent when rendering with MSAA #315
FrancescoC-unity May 6, 2020
6abeb5c
Fix issue with the resolve of motion vectors (#421)
FrancescoC-unity May 13, 2020
a740363
Merge branch '7.x.x/hd/staging' of https://github.com/Unity-Technolog…
sebastienlagarde May 14, 2020
6e5663e
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde May 14, 2020
54e5fce
fix issue with ShowPrePassAndPostPass
sebastienlagarde May 12, 2020
a5b8bac
fix compilation issue in rendergraph
sebastienlagarde May 15, 2020
2f5ea1c
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde May 15, 2020
7b84523
Fixed null reference exception in LookDev when setting the SRP to Non…
pmavridis May 15, 2020
fe2ad48
Check reflection probe null pointer before use. (case 1244047) #456
fredericv-unity3d May 15, 2020
acf8f95
Remove max atlas probe alloc size in HDRP asset (#458)
alelievr May 15, 2020
69b807c
Fix few multi-editing issues with Emission UI #473
FrancescoC-unity May 15, 2020
ffb2425
Re-enable cubemap thumbnail gen only for d3d11 #487
FrancescoC-unity May 15, 2020
daa66ea
Hd/fix undo environmentlibrary lookdev #490
RSlysz May 15, 2020
d31417e
Added system requirements and frame settings api docs (#510)
JordanL8 May 15, 2020
566a1f1
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde May 18, 2020
b5c6f7f
hide exposure compensation for fixed exposure (#535)
sebastienlagarde May 18, 2020
60ff03d
[9.x.x] Fix Microshadow not working properly with LightLayers enabled…
sebastienlagarde May 18, 2020
8d58f81
Use path relative to package for depth of field #523
FrancescoC-unity May 18, 2020
402a718
Fix taaFrameIndex and restore TAA tests for XR #534
fabien-unity May 18, 2020
f409041
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde May 18, 2020
4f52829
Fix an issue in reading the gbuffer for ray traced subsurface scatter…
anisunity May 18, 2020
6102466
fix DXR manifest
sebastienlagarde May 18, 2020
9174314
update reference screenshots
sebastienlagarde May 18, 2020
7e75729
[Backport 7.x.x] Fixed an issue where manipulating the color wheels i…
JulienIgnace-Unity Jun 19, 2020
1f836e7
[Backport 7.x.x] Fixed an issue where static sky lighting would not b…
JulienIgnace-Unity Jun 19, 2020
714a7b1
[Backport 7.x.x] Add defines guards around shadows hlsl files (#1091)
FrancescoC-unity Jul 2, 2020
df7cc1d
[Backport 7.x.x] Fix issue with light layers > 7 in the deferred pat…
FrancescoC-unity Jul 2, 2020
5e5ecd9
[Backport 7.x.x] Fix decal being duplicated in prefab isolation mode.…
JulienIgnace-Unity Jul 2, 2020
2d69e2e
Implemented proper culling for decals when used in prefabs and edited…
JulienIgnace-Unity Jun 11, 2020
4c53990
Compilation fix
JulienIgnace-Unity Jun 15, 2020
9d4d7d1
Update changelog
JulienIgnace-Unity Jul 2, 2020
2320843
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde Jul 6, 2020
97503ad
Merge branch '7.x.x/release' into 7.x.x/hd/staging
sebastienlagarde Aug 3, 2020
45626b5
Merge branch '7.x.x/hd/staging' into 7.x.x/hd/fix-prefab-decal-2
sebastienlagarde Aug 3, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ public void OnGUI()

// Even if the asset is not dirty, the list of component may have been changed by another inspector.
// In this case, only the hash will tell us that we need to refresh.
if (asset.isDirty || asset.GetHashCode() != m_CurrentHashCode)
if (asset.isDirty || asset.GetComponentListHashCode() != m_CurrentHashCode)
{
RefreshEditors();
m_CurrentHashCode = asset.GetHashCode();
m_CurrentHashCode = asset.GetComponentListHashCode();
asset.isDirty = false;
}

Expand Down
13 changes: 13 additions & 0 deletions com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,18 @@ public override int GetHashCode()
return hash;
}
}

internal int GetComponentListHashCode()
{
unchecked
{
int hash = 17;

for (int i = 0; i < components.Count; i++)
hash = hash * 23 + components[i].GetType().GetHashCode();

return hash;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef SHADOW_SAMPLING_TENT_INCLUDED
#define SHADOW_SAMPLING_TENT_INCLUDED
// ------------------------------------------------------------------
// PCF Filtering Tent Functions
// ------------------------------------------------------------------
Expand Down Expand Up @@ -242,3 +244,4 @@ void SampleShadow_ComputeSamples_Tent_7x7(real4 shadowMapTexture_TexelSize, real
fetchesWeights[14] = fetchesWeightsU.z * fetchesWeightsV.w;
fetchesWeights[15] = fetchesWeightsU.w * fetchesWeightsV.w;
}
#endif
6 changes: 6 additions & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ The version number for this package has increased due to a version update of a r
- Cloned volume profile from read only assets are created in the root of the project. (case 1154961)
- Fixed Wizard check on default volume profile to also check it is not the default one in package.
- Fixed a bug where not all entries were generated for the Attributes Struct in Shader Graph shaders. (case 1250275)
- Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time.
- Fixed an issue where static sky lighting would not be updated for a new scene until it's reloaded at least once.
- Fixed missing include guards in shadow hlsl files.
- Fixed issue with light layers bigger than 8 (and above the supported range).
- Fixed an issue where decals were duplicated in prefab isolation mode.
- Fixed culling for decals when used in prefabs and edited in context.

### Changed
- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void DrawHandles()
{
// Smoothly update the decal image projected
Matrix4x4 sizeOffset = Matrix4x4.Translate(decalProjector.decalOffset) * Matrix4x4.Scale(decalProjector.decalSize);
DecalSystem.instance.UpdateCachedData(decalProjector.position, decalProjector.rotation, sizeOffset, decalProjector.drawDistance, decalProjector.fadeScale, decalProjector.uvScaleBias, decalProjector.affectsTransparency, decalProjector.Handle, decalProjector.gameObject.layer, decalProjector.fadeFactor);
DecalSystem.instance.UpdateCachedData(decalProjector.position, decalProjector.rotation, sizeOffset, decalProjector.drawDistance, decalProjector.fadeScale, decalProjector.uvScaleBias, decalProjector.affectsTransparency, decalProjector.Handle, decalProjector.gameObject.layer, decalProjector.gameObject.sceneCullingMask, decalProjector.fadeFactor);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ class SerializedStaticLightingSky
{
SerializedObject serializedObject;
public SerializedProperty skyUniqueID;
public SerializedProperty profile;
public VolumeProfile volumeProfile
{
get => (serializedObject.targetObject as StaticLightingSky).profile;
set => (serializedObject.targetObject as StaticLightingSky).profile = value;
}

public SerializedStaticLightingSky(StaticLightingSky staticLightingSky)
{
serializedObject = new SerializedObject(staticLightingSky);
skyUniqueID = serializedObject.FindProperty("m_StaticLightingSkyUniqueID");
profile = serializedObject.FindProperty("m_Profile");
}

public void Apply() => serializedObject.ApplyModifiedProperties();
Expand Down Expand Up @@ -170,10 +173,12 @@ void DrawGUI()
++EditorGUI.indentLevel;

//cannot use SerializeProperty due to logic in the property
var profile = m_SerializedActiveSceneLightingSky.profile.objectReferenceValue;
var newProfile = EditorGUILayout.ObjectField(EditorGUIUtility.TrTextContent("Profile"), m_SerializedActiveSceneLightingSky.profile.objectReferenceValue, typeof(VolumeProfile), allowSceneObjects: false) as VolumeProfile;
var profile = m_SerializedActiveSceneLightingSky.volumeProfile;
var newProfile = EditorGUILayout.ObjectField(EditorGUIUtility.TrTextContent("Profile"), profile, typeof(VolumeProfile), allowSceneObjects: false) as VolumeProfile;
if (profile != newProfile)
m_SerializedActiveSceneLightingSky.profile.objectReferenceValue = newProfile;
{
m_SerializedActiveSceneLightingSky.volumeProfile = newProfile;
}

using (new EditorGUI.DisabledScope(m_SkyClassNames.Count == 1)) // Only "None"
{
Expand All @@ -200,7 +205,7 @@ void UpdateSkyIntPopupData()
m_SkyClassNames.Add(new GUIContent("None"));
m_SkyUniqueIDs.Add(0);

VolumeProfile profile = m_SerializedActiveSceneLightingSky.profile.objectReferenceValue as VolumeProfile;
VolumeProfile profile = m_SerializedActiveSceneLightingSky.volumeProfile;
if (profile != null)
{
var skyTypesDict = SkyManager.skyTypesDict;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef HD_SHADOW_ALGORITHMS_INCLUDED
#define HD_SHADOW_ALGORITHMS_INCLUDED
// Various shadow algorithms
// There are two variants provided, one takes the texture and sampler explicitly so they can be statically passed in.
// The variant without resource parameters dynamically accesses the texture when sampling.
Expand Down Expand Up @@ -341,3 +343,4 @@ float EvalShadow_SampleClosestDistance_Punctual(HDShadowData sd, Texture2D tex,

return distance(occluderPosWS, lightPositionWS);
}
#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef HD_SHADOW_SAMPLING_INCLUDED
#define HD_SHADOW_SAMPLING_INCLUDED
// Various shadow sampling logic.
// Again two versions, one for dynamic resource indexing, one for static resource access.

Expand Down Expand Up @@ -328,3 +330,4 @@ float SampleShadow_PCSS(float3 tcs, float2 posSS, float2 scale, float2 offset, f
// shadowData.shadowFilterParams0.z = shadowRequest.maxDepthBias;

// #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDIMS.hlsl"
#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef SHADOW_MOMENTS_INCLUDED
#define SHADOW_MOMENTS_INCLUDED
// Library header containing various useful functions for doing moment based shadow maps.
// Supported flavors are VSM, EVSM and MSM

Expand Down Expand Up @@ -131,3 +133,4 @@ float ShadowMoments_SolveDelta4MSM( float3 z, float4 b, float lightLeakBias)

return saturate( ((1.0 - attenuation) - lightLeakBias) / (1.0 - lightLeakBias) );
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ enum Version
if (decal.m_Handle != null)
DecalSystem.instance.RemoveDecal(decal.m_Handle);
Matrix4x4 sizeOffset = Matrix4x4.Translate(decal.decalOffset) * Matrix4x4.Scale(decal.decalSize);
decal.m_Handle = DecalSystem.instance.AddDecal(decal.position, decal.rotation, Vector3.one, sizeOffset, decal.m_DrawDistance, decal.m_FadeScale, decal.uvScaleBias, decal.m_AffectsTransparency, decal.m_Material, decal.gameObject.layer, decal.m_FadeFactor);
decal.m_Handle = DecalSystem.instance.AddDecal(decal.position, decal.rotation, Vector3.one, sizeOffset, decal.m_DrawDistance, decal.m_FadeScale, decal.uvScaleBias, decal.m_AffectsTransparency, decal.m_Material, decal.gameObject.layer, decal.gameObject.sceneCullingMask, decal.m_FadeFactor);
}),
MigrationStep.New(Version.FixPivotPosition, (DecalProjector decal) =>
{
Expand Down Expand Up @@ -69,7 +69,7 @@ enum Version
if (decal.m_Handle != null)
DecalSystem.instance.RemoveDecal(decal.m_Handle);
Matrix4x4 sizeOffset = Matrix4x4.Translate(decal.decalOffset) * Matrix4x4.Scale(decal.decalSize);
decal.m_Handle = DecalSystem.instance.AddDecal(decal.position, decal.rotation, Vector3.one, sizeOffset, decal.m_DrawDistance, decal.m_FadeScale, decal.uvScaleBias, decal.m_AffectsTransparency, decal.m_Material, decal.gameObject.layer, decal.m_FadeFactor);
decal.m_Handle = DecalSystem.instance.AddDecal(decal.position, decal.rotation, Vector3.one, sizeOffset, decal.m_DrawDistance, decal.m_FadeScale, decal.uvScaleBias, decal.m_AffectsTransparency, decal.m_Material, decal.gameObject.layer, decal.gameObject.sceneCullingMask, decal.m_FadeFactor);
})
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void OnEnable()
}

Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize);
m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, m_FadeFactor);
m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, gameObject.sceneCullingMask, m_FadeFactor);
m_OldMaterial = m_Material;

#if UNITY_EDITOR
Expand All @@ -253,7 +253,13 @@ void UpdateDecalVisibility()
else if (m_Handle == null)
{
Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize);
m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, m_FadeFactor);
m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, gameObject.sceneCullingMask, m_FadeFactor);
}
else
{
// Scene culling mask may have changed.
Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize);
DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, gameObject.sceneCullingMask, m_FadeFactor);
}
}
#endif
Expand Down Expand Up @@ -292,7 +298,7 @@ internal void OnValidate()

if (m_Material != null)
{
m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, m_FadeFactor);
m_Handle = DecalSystem.instance.AddDecal(position, rotation, Vector3.one, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Material, gameObject.layer, gameObject.sceneCullingMask, m_FadeFactor);

if (!DecalSystem.IsHDRenderPipelineDecal(m_Material.shader)) // non HDRP/decal shaders such as shader graph decal do not affect transparency
{
Expand All @@ -310,7 +316,7 @@ internal void OnValidate()
}
else // no material change, just update whatever else changed
{
DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, m_FadeFactor);
DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, gameObject.sceneCullingMask, m_FadeFactor);
}
}
}
Expand All @@ -322,7 +328,7 @@ void Update() // only run in editor
{
Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize);
m_Layer = gameObject.layer;
DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, m_FadeFactor);
DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, gameObject.sceneCullingMask, m_FadeFactor);
}
}
#endif
Expand All @@ -334,7 +340,7 @@ void LateUpdate()
if (transform.hasChanged == true)
{
Matrix4x4 sizeOffset = Matrix4x4.Translate(decalOffset) * Matrix4x4.Scale(decalSize);
DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, m_FadeFactor);
DecalSystem.instance.UpdateCachedData(position, rotation, sizeOffset, m_DrawDistance, m_FadeScale, uvScaleBias, m_AffectsTransparency, m_Handle, gameObject.layer, gameObject.sceneCullingMask, m_FadeFactor);
transform.hasChanged = false;
}
}
Expand Down
Loading