Skip to content

SRP-Picking changes #3419

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 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6e8e20a
Graft SRP-Picking changes
joeante Feb 8, 2021
24868e9
Disable Gizmos and Wireframe overlay during RenderRequests
JussiKnuuttila Feb 8, 2021
1b08edd
Z-fail passes for selection outline
JussiKnuuttila Feb 9, 2021
4e23729
Selection outline rendering should now more closely match the old C++…
JussiKnuuttila Feb 9, 2021
d080abe
One-pass implementation for occlusion support in outline mask.
JussiKnuuttila Feb 10, 2021
5264232
One-pass occlusion support for selection outline, shader code.
JussiKnuuttila Feb 10, 2021
3465bd1
Fix parts of HDRP Outline rendering
JussiKnuuttila Feb 10, 2021
590c36a
Switched ObjectId and EntityId DataExtraction to use RGBA8888 to be c…
JussiKnuuttila Feb 10, 2021
10cd248
Picking and outline working in HDRP.
JussiKnuuttila Feb 11, 2021
4f52564
DrawGizmos render request mode
joeante Feb 12, 2021
3f6c180
Use blending to make sure "unoccluded" values always remain on top in…
JussiKnuuttila Feb 12, 2021
aa05312
Use blending to make sure "unoccluded" values always remain on top in…
JussiKnuuttila Feb 12, 2021
988920a
Clean up unused things from new picking and outline rendering
JussiKnuuttila Apr 9, 2021
4a04626
Share data extraction shader code between HDRP and URP
JussiKnuuttila Apr 9, 2021
d8cf478
Cleaned up unused "DataExtraction_Value" and placed outline mask test…
JussiKnuuttila Apr 9, 2021
2bf3d12
Split RenderRequestRenderer and RenderRequestRendererData into a sepa…
JussiKnuuttila May 6, 2021
3bc9a11
Split selection masks into a separate renderer class since they had a…
JussiKnuuttila May 6, 2021
0515bd7
Add missing software Z-buffer declarations for HLSL files and templat…
JussiKnuuttila May 6, 2021
7427e26
Removed PickingSpaceTransforms.hlsl, it is no longer necessary.
JussiKnuuttila May 6, 2021
57f501d
Fixed some shader warnings.
JussiKnuuttila May 7, 2021
582826e
Remove unused GetDebugViewTargetBuffer method to reduce diff from master
JussiKnuuttila Jun 4, 2021
c650a6b
Rename a variable with a typo
JussiKnuuttila Jun 4, 2021
5c4ea96
Move picking ID packing to Packing.hlsl
JussiKnuuttila Jun 4, 2021
35bc5d4
Change outline mask to use LOAD as per review request
JussiKnuuttila Jun 4, 2021
29f5eb5
Merge branch '10.x.x/release' into 10.x.x/srp-picking
JussiKnuuttila Jun 4, 2021
f5ce64c
Add ConvertMetallicToSpecular and ConvertSpecularToMetallic to DataEx…
JussiKnuuttila Jun 7, 2021
192c788
Add 1 to entityIDs when rendering picking, so the entityID zero gets …
JussiKnuuttila Jun 7, 2021
3cb7be8
Merge branch '10.x.x/release' into 10.x.x/srp-picking
JussiKnuuttila Jun 8, 2021
f29d9cc
Merge branch '10.x.x/release' into 10.x.x/srp-picking
JussiKnuuttila Jun 17, 2021
afdbc19
Remove DebugAllowRGBConversion which has been replaced by DebugAOVOutput
JussiKnuuttila Jun 17, 2021
39e4faa
Merge branch '10.x.x/release' into 10.x.x/srp-picking
JussiKnuuttila Aug 30, 2021
653966e
Fix some objects (e.g. Plane mesh) not getting correctly picked due t…
JussiKnuuttila Sep 2, 2021
0373425
Clarify comment for disabling backface culling.
JussiKnuuttila Sep 3, 2021
35ca765
Merge branch '10.x.x/release' into 10.x.x/srp-picking
JussiKnuuttila Sep 3, 2021
5ae8bc7
Remove PickingSpaceTransforms includes from parent merge
JussiKnuuttila Sep 3, 2021
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 @@ -62,9 +62,9 @@ real PerceptualSmoothnessToPerceptualRoughness(real perceptualSmoothness)
// but chopping the far tails of GGX and keeping 94% of the mass yields a distribution with a defined variance where
// we can then relate the roughness of GGX to a variance (see Ray Tracing Gems p153 - the reference is wrong though,
// the Conty paper doesn't mention this at all, but it can be found in stats using quantiles):
//
//
// roughnessGGX^2 = variance / 2
//
//
// From the two previous, if we want roughly comparable variances of slopes between a Beckmann and a GGX NDF, we can
// equate the variances and get a conversion of their roughnesses:
//
Expand Down
56 changes: 56 additions & 0 deletions com.unity.render-pipelines.core/ShaderLibrary/DataExtraction.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#ifndef UNITY_DATA_EXTRACTION_INCLUDED
#define UNITY_DATA_EXTRACTION_INCLUDED

#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"

// These correspond to UnityEngine.Camera.RenderRequestMode enum values
#define RENDER_OBJECT_ID 1
#define RENDER_DEPTH 2
#define RENDER_WORLD_NORMALS_FACE_RGB 3
#define RENDER_WORLD_POSITION_RGB 4
#define RENDER_ENTITY_ID 5
#define RENDER_BASE_COLOR_RGBA 6
#define RENDER_SPECULAR_RGB 7
#define RENDER_METALLIC_R 8
#define RENDER_EMISSION_RGB 9
#define RENDER_WORLD_NORMALS_PIXEL_RGB 10
#define RENDER_SMOOTHNESS_R 11
#define RENDER_OCCLUSION_R 12
#define RENDER_DIFFUSE_COLOR_RGBA 13
#define RENDER_OUTLINE_MASK 14

float4 ComputeEntityPickingValue(uint entityID)
{
// Add 1 to the ID, so the entity ID 0 gets a value that is not equal
// to the clear value.
uint pickingValue = entityID + 1;
return PackId32ToRGBA8888(pickingValue);
}

float4 ComputeSelectionMask(float objectGroupId, float3 ndcWithZ, TEXTURE2D_PARAM(depthBuffer, sampler_depthBuffer))
{
// float sceneZ = SAMPLE_TEXTURE2D(depthBuffer, sampler_depthBuffer, ndcWithZ.xy).r;
// Use LOAD so this is compatible with MSAA. Original SAMPLE kept here for reference.
float2 depthBufferSize;
depthBuffer.GetDimensions(depthBufferSize.x, depthBufferSize.y);
float2 unnormalizedUV = depthBufferSize * ndcWithZ.xy;
float sceneZ = LOAD_TEXTURE2D(depthBuffer, unnormalizedUV).r;

// Use a small multiplicative Z bias to make it less likely for objects to self occlude in the outline buffer
static const float zBias = 0.02;
#if UNITY_REVERSED_Z
float pixelZ = ndcWithZ.z * (1 + zBias);
bool occluded = pixelZ < sceneZ;
#else
float pixelZ = ndcWithZ.z * (1 - zBias);
bool occluded = pixelZ > sceneZ;
#endif
// Red channel = unique identifier, can be used to separate groups of objects from each other
// to get outlines between them.
// Green channel = occluded behind depth buffer (0) or not occluded (1)
// Blue channel = always 1 = not cleared to zero = there's an outlined object at this pixel
return float4(objectGroupId, occluded ? 0 : 1, 1, 1);
}

#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 25 additions & 2 deletions com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ real3 UnpackNormalRGBNoScale(real4 packedNormal)
return packedNormal.rgb * 2.0 - 1.0;
}

real3 PackNormalRGB(real3 normal, real scale = 1.0)
{
normal = normal * 0.5 + 0.5;
normal.xy *= scale;
return normal;
}

real3 UnpackNormalAG(real4 packedNormal, real scale = 1.0)
{
real3 normal;
Expand Down Expand Up @@ -552,14 +559,30 @@ float3 PackFloat2To888(float2 f)
// Unpack 2 float of 12bit packed into a 888
float2 Unpack888ToFloat2(float3 x)
{
uint3 i = (uint3)(x * 255.5); // +0.5 to fix precision error on iOS
uint3 i = (uint3)(x * 255.5); // +0.5 to fix precision error on iOS
// 8 bit in lo, 4 bit in hi
uint hi = i.z >> 4;
uint lo = i.z & 15;
uint2 cb = i.xy | uint2(lo << 8, hi << 8);

return cb / 4095.0;
}

// Pack a 32-bit integer into four 8-bit color channels such that the integer can be
// exactly reconstructed afterwards.
float4 PackId32ToRGBA8888(uint id32)
{
uint b0 = (id32 >> 0) & 0xff;
uint b1 = (id32 >> 8) & 0xff;
uint b2 = (id32 >> 16) & 0xff;
uint b3 = (id32 >> 24) & 0xff;
float f0 = (float)b0 / 255.0f;
float f1 = (float)b1 / 255.0f;
float f2 = (float)b2 / 255.0f;
float f3 = (float)b3 / 255.0f;
return float4(f0, f1, f2, f3);
}

#endif // SHADER_API_GLES

// Pack 2 float values from the [0, 1] range, to an 8 bits float from the [0, 1] range
Expand All @@ -571,7 +594,7 @@ float PackFloat2To8(float2 f)
return x_y_expanded / 255.0;

// above 4 lines equivalent to:
//return (16.0 * f.x + f.y) / 17.0;
//return (16.0 * f.x + f.y) / 17.0;
}

// Unpack 2 float values from the [0, 1] range, packed in an 8 bits float from the [0, 1] range
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#pragma warning (disable : 3205) // conversion of larger type to smaller
#endif

// Caution: For HDRP, adding a function in this file requires adding the appropriate #define in PickingSpaceTransforms.hlsl

// Return the PreTranslated ObjectToWorld Matrix (i.e matrix with _WorldSpaceCameraPos apply to it if we use camera relative rendering)
float4x4 GetObjectToWorldMatrix()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ static class DecalIncludes
{ kColor, IncludeLocation.Pregraph },
{ kFunctions, IncludeLocation.Pregraph },
{ CoreIncludes.MinimalCorePregraph },
{ CoreIncludes.kPickingSpaceTransforms, IncludeLocation.Pregraph },
{ kDecal, IncludeLocation.Pregraph },
{ kPassDecal, IncludeLocation.Postgraph },
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ IncludeCollection GenerateIncludes()
{
var includes = new IncludeCollection();

includes.Add(CoreIncludes.kPickingSpaceTransforms, IncludeLocation.Pregraph);
includes.Add(CoreIncludes.CorePregraph);
includes.Add(CoreIncludes.kPassPlaceholder, IncludeLocation.Pregraph);
includes.Add(CoreIncludes.CoreUtility);
Expand Down Expand Up @@ -133,7 +132,6 @@ IncludeCollection GenerateIncludes()
{
var includes = new IncludeCollection();

includes.Add(CoreIncludes.kPickingSpaceTransforms, IncludeLocation.Pregraph);
includes.Add(CoreIncludes.CorePregraph);
if (supportLighting)
includes.Add(CoreIncludes.kNormalSurfaceGradient, IncludeLocation.Pregraph);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,6 @@ static class CoreIncludes
public const string kFragInputs = "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/FragInputs.hlsl";
public const string kMaterial = "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl";
public const string kDebugDisplay = "Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.hlsl";
public const string kPickingSpaceTransforms = "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl";

// CoreUtility
public const string kBuiltInUtilities = "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/BuiltinUtilities.hlsl";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ Pass
#ifdef SCENESELECTIONPASS
int _ObjectId;
int _PassValue;
TEXTURE2D(unity_EditorViz_DepthBuffer);
SAMPLER(sampler_unity_EditorViz_DepthBuffer);
#endif

// Includes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ${VFXIncludeRP("VFXLit.template")}
#if VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION
int _ObjectId;
int _PassValue;
TEXTURE2D(unity_EditorViz_DepthBuffer);
SAMPLER(sampler_unity_EditorViz_DepthBuffer);
#endif

#pragma fragment frag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ ${SHADERGRAPH_PIXEL_CODE_DEPTHONLY}
#if VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION
int _ObjectId;
int _PassValue;
TEXTURE2D(unity_EditorViz_DepthBuffer);
SAMPLER(sampler_unity_EditorViz_DepthBuffer);
#endif

#pragma fragment frag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ unsafe struct ShaderVariablesDebugDisplay
public int _DebugProbeVolumeMode;
public int _DebugAOVOutput;
public int _DebugDisplayPad0;
public int _DebugDisplayPad1;
public int _DebugDisplayPad1;
}

/// <summary>
Expand Down Expand Up @@ -73,6 +73,7 @@ public enum FullScreenDebugMode
PreRefractionColorPyramid,
/// <summary>Display the Depth Pyramid.</summary>
DepthPyramid,
WorldSpacePosition,
/// <summary>Display the final color pyramid for the frame.</summary>
FinalColorPyramid,

Expand Down Expand Up @@ -1402,7 +1403,7 @@ void RegisterLightingDebug()
{
var container = new DebugUI.Container
{
children =
children =
{
new DebugUI.EnumField { displayName = "Light Volume Debug Type", getter = () => (int)data.lightingDebugSettings.lightVolumeDebugByCategory, setter = value => data.lightingDebugSettings.lightVolumeDebugByCategory = (LightVolumeDebug)value, autoEnum = typeof(LightVolumeDebug), getIndex = () => data.lightVolumeDebugTypeEnumIndex, setIndex = value => data.lightVolumeDebugTypeEnumIndex = value, onValueChanged = RefreshLightingDebug }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,29 @@
#define FULLSCREENDEBUGMODE_SCREEN_SPACE_SHADOWS (7)
#define FULLSCREENDEBUGMODE_PRE_REFRACTION_COLOR_PYRAMID (8)
#define FULLSCREENDEBUGMODE_DEPTH_PYRAMID (9)
#define FULLSCREENDEBUGMODE_FINAL_COLOR_PYRAMID (10)
#define FULLSCREENDEBUGMODE_LIGHT_CLUSTER (11)
#define FULLSCREENDEBUGMODE_SCREEN_SPACE_GLOBAL_ILLUMINATION (12)
#define FULLSCREENDEBUGMODE_RECURSIVE_RAY_TRACING (13)
#define FULLSCREENDEBUGMODE_RAY_TRACED_SUB_SURFACE (14)
#define FULLSCREENDEBUGMODE_MAX_LIGHTING_FULL_SCREEN_DEBUG (15)
#define FULLSCREENDEBUGMODE_MIN_RENDERING_FULL_SCREEN_DEBUG (16)
#define FULLSCREENDEBUGMODE_MOTION_VECTORS (17)
#define FULLSCREENDEBUGMODE_NAN_TRACKER (18)
#define FULLSCREENDEBUGMODE_COLOR_LOG (19)
#define FULLSCREENDEBUGMODE_DEPTH_OF_FIELD_COC (20)
#define FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW (21)
#define FULLSCREENDEBUGMODE_QUAD_OVERDRAW (22)
#define FULLSCREENDEBUGMODE_VERTEX_DENSITY (23)
#define FULLSCREENDEBUGMODE_REQUESTED_VIRTUAL_TEXTURE_TILES (24)
#define FULLSCREENDEBUGMODE_MAX_RENDERING_FULL_SCREEN_DEBUG (25)
#define FULLSCREENDEBUGMODE_MIN_MATERIAL_FULL_SCREEN_DEBUG (26)
#define FULLSCREENDEBUGMODE_VALIDATE_DIFFUSE_COLOR (27)
#define FULLSCREENDEBUGMODE_VALIDATE_SPECULAR_COLOR (28)
#define FULLSCREENDEBUGMODE_MAX_MATERIAL_FULL_SCREEN_DEBUG (29)
#define FULLSCREENDEBUGMODE_SCREEN_SPACE_REFLECTIONS_PREV (30)
#define FULLSCREENDEBUGMODE_SCREEN_SPACE_REFLECTIONS_ACCUM (31)
#define FULLSCREENDEBUGMODE_WORLD_SPACE_POSITION (10)
#define FULLSCREENDEBUGMODE_FINAL_COLOR_PYRAMID (11)
#define FULLSCREENDEBUGMODE_LIGHT_CLUSTER (12)
#define FULLSCREENDEBUGMODE_SCREEN_SPACE_GLOBAL_ILLUMINATION (13)
#define FULLSCREENDEBUGMODE_RECURSIVE_RAY_TRACING (14)
#define FULLSCREENDEBUGMODE_RAY_TRACED_SUB_SURFACE (15)
#define FULLSCREENDEBUGMODE_MAX_LIGHTING_FULL_SCREEN_DEBUG (16)
#define FULLSCREENDEBUGMODE_MIN_RENDERING_FULL_SCREEN_DEBUG (17)
#define FULLSCREENDEBUGMODE_MOTION_VECTORS (18)
#define FULLSCREENDEBUGMODE_NAN_TRACKER (19)
#define FULLSCREENDEBUGMODE_COLOR_LOG (20)
#define FULLSCREENDEBUGMODE_DEPTH_OF_FIELD_COC (21)
#define FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW (22)
#define FULLSCREENDEBUGMODE_QUAD_OVERDRAW (23)
#define FULLSCREENDEBUGMODE_VERTEX_DENSITY (24)
#define FULLSCREENDEBUGMODE_REQUESTED_VIRTUAL_TEXTURE_TILES (25)
#define FULLSCREENDEBUGMODE_MAX_RENDERING_FULL_SCREEN_DEBUG (26)
#define FULLSCREENDEBUGMODE_MIN_MATERIAL_FULL_SCREEN_DEBUG (27)
#define FULLSCREENDEBUGMODE_VALIDATE_DIFFUSE_COLOR (28)
#define FULLSCREENDEBUGMODE_VALIDATE_SPECULAR_COLOR (29)
#define FULLSCREENDEBUGMODE_MAX_MATERIAL_FULL_SCREEN_DEBUG (30)
#define FULLSCREENDEBUGMODE_SCREEN_SPACE_REFLECTIONS_PREV (31)
#define FULLSCREENDEBUGMODE_SCREEN_SPACE_REFLECTIONS_ACCUM (32)

// Generated from UnityEngine.Rendering.HighDefinition.ShaderVariablesDebugDisplay
// PackingRules = Exact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,17 @@ Shader "Hidden/HDRP/DebugFullScreen"
return float4(linearDepth.xxx, 1.0);
}

if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_WORLD_SPACE_POSITION)
{
float depth = LoadCameraDepth(input.positionCS.xy);
PositionInputs posInput = GetPositionInput(input.positionCS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_V);
float3 positionWS = GetAbsolutePositionWS(posInput.positionWS);

if (depth != 0)
return float4(positionWS.xyz, 1.0);
return float4(0.0, 0.0, 0.0, 0.0);
}

if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_TRANSPARENCY_OVERDRAW)
{
float4 color = (float4)0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ Shader "HDRP/AxF"
// We reuse depth prepass for the scene selection, allow to handle alpha correctly as well as tessellation and vertex animation
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#define SCENEPICKINGPASS
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/ShaderPass/AxFDepthPass.hlsl"
Expand Down Expand Up @@ -261,7 +260,6 @@ Shader "HDRP/AxF"
// We reuse depth prepass for the scene selection, allow to handle alpha correctly as well as tessellation and vertex animation
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#define SCENESELECTIONPASS // This will drive the output of the scene selection shader
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/ShaderPass/AxFDepthPass.hlsl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,7 @@ float3 _EmissionColor;
int _ObjectId;
int _PassValue;
float4 _SelectionID;
TEXTURE2D(unity_EditorViz_DepthBuffer);
SAMPLER(sampler_unity_EditorViz_DepthBuffer);

CBUFFER_END
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,11 @@ Shader "HDRP/Decal"
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#define SCENEPICKINGPASS
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalProperties.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/Decal.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/ShaderPass/DecalSharePass.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl"

#pragma editor_sync_compilation

ENDHLSL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ public DecalHandle AddDecal(int materialID, in DecalProjector.CachedDecalData da
ulong[] newCachedSceneLayerMask = new ulong[m_DecalsCount + kDecalBlockSize];
var cachedDecalLayerMask = new DecalLayerEnum[m_DecalsCount + kDecalBlockSize];
float[] newCachedFadeFactor = new float[m_DecalsCount + kDecalBlockSize];

m_ResultIndices = new int[m_DecalsCount + kDecalBlockSize];

m_Handles.CopyTo(newHandles, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ Shader "HDRP/LayeredLit"
// We reuse depth prepass for the scene selection, allow to handle alpha correctly as well as tessellation and vertex animation
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#define SCENEPICKINGPASS
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitDepthPass.hlsl"
Expand Down Expand Up @@ -590,7 +589,6 @@ Shader "HDRP/LayeredLit"

#define SHADERPASS SHADERPASS_DEPTH_ONLY
#define SCENESELECTIONPASS // This will drive the output of the scene selection shader
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitDepthPass.hlsl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,6 @@ Shader "HDRP/LayeredLitTessellation"
// We reuse depth prepass for the scene selection, allow to handle alpha correctly as well as tessellation and vertex animation
#define SHADERPASS SHADERPASS_DEPTH_ONLY
#define SCENEPICKINGPASS
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitDepthPass.hlsl"
Expand Down Expand Up @@ -609,7 +608,6 @@ Shader "HDRP/LayeredLitTessellation"

#define SHADERPASS SHADERPASS_DEPTH_ONLY
#define SCENESELECTIONPASS // This will drive the output of the scene selection shader
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitDepthPass.hlsl"
Expand Down
Loading