From 9e2e8c19e5d93dcedcc4ac01f200bffa0e0a689a Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Sat, 24 Oct 2020 14:06:10 +0200 Subject: [PATCH 1/2] Fix typo with SHADERPASS_FULL_SCREEN_DEBUG --- .../Editor/Material/ShaderGraph/HDShaderPasses.cs | 2 +- .../Runtime/Material/AxF/AxF.shader | 2 +- .../Runtime/Material/LayeredLit/LayeredLit.shader | 2 +- .../Material/LayeredLit/LayeredLitTessellation.shader | 2 +- .../Runtime/Material/Lit/Lit.shader | 2 +- .../Runtime/Material/Lit/LitTessellation.shader | 2 +- .../Runtime/Material/Unlit/Unlit.shader | 2 +- .../Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl | 2 +- .../ShaderPass/ShaderPassFullScreenDebug.hlsl | 2 +- .../Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl | 8 ++++---- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs index 9806b902065..aaf1322765f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs @@ -1203,7 +1203,7 @@ public static PassDescriptor GenerateFullScreenDebug() { // Definition displayName = "FullScreenDebug", - referenceName = "SHADERPASS_FULLSCREEN_DEBUG", + referenceName = "SHADERPASS_FULL_SCREEN_DEBUG", lightMode = "FullScreenDebug", useInPreview = false, diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader index e22d60871c9..09f6f58da52 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxF.shader @@ -459,7 +459,7 @@ Shader "HDRP/AxF" HLSLPROGRAM - #define SHADERPASS SHADERPASS_FULLSCREEN_DEBUG + #define SHADERPASS SHADERPASS_FULL_SCREEN_DEBUG #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/AxFSharePass.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader index 96062fd3663..6414f6526ba 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLit.shader @@ -907,7 +907,7 @@ Shader "HDRP/LayeredLit" // enable dithering LOD crossfade #pragma multi_compile _ LOD_FADE_CROSSFADE - #define SHADERPASS SHADERPASS_FULLSCREEN_DEBUG + #define SHADERPASS SHADERPASS_FULL_SCREEN_DEBUG #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/LitSharePass.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader index da0726989bd..871d6bab210 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/LayeredLit/LayeredLitTessellation.shader @@ -865,7 +865,7 @@ Shader "HDRP/LayeredLitTessellation" HLSLPROGRAM - #define SHADERPASS SHADERPASS_FULLSCREEN_DEBUG + #define SHADERPASS SHADERPASS_FULL_SCREEN_DEBUG #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/LitSharePass.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index 89876ecb300..ef7182bb677 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -938,7 +938,7 @@ Shader "HDRP/Lit" // enable dithering LOD crossfade #pragma multi_compile _ LOD_FADE_CROSSFADE - #define SHADERPASS SHADERPASS_FULLSCREEN_DEBUG + #define SHADERPASS SHADERPASS_FULL_SCREEN_DEBUG #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/LitSharePass.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader index 12a50247bdc..52cb90c512c 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitTessellation.shader @@ -832,7 +832,7 @@ Shader "HDRP/LitTessellation" HLSLPROGRAM - #define SHADERPASS SHADERPASS_FULLSCREEN_DEBUG + #define SHADERPASS SHADERPASS_FULL_SCREEN_DEBUG #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/LitSharePass.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader index 3da0773be9f..ae2ccd570f2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.shader @@ -456,7 +456,7 @@ Shader "HDRP/Unlit" // enable dithering LOD crossfade #pragma multi_compile _ LOD_FADE_CROSSFADE - #define SHADERPASS SHADERPASS_FULLSCREEN_DEBUG + #define SHADERPASS SHADERPASS_FULL_SCREEN_DEBUG #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Material.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/Unlit.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Unlit/ShaderPass/UnlitSharePass.hlsl" diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl index 977ef4c0fb6..c54ab9d5838 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl @@ -32,7 +32,7 @@ #define SHADERPASS_RAYTRACING_SUB_SURFACE (22) #define SHADERPASS_PATH_TRACING (23) #define SHADERPASS_CONSTANT (24) -#define SHADERPASS_FULLSCREEN_DEBUG (25) +#define SHADERPASS_FULL_SCREEN_DEBUG (25) #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl index 8c02b2222d4..208099dc635 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassFullScreenDebug.hlsl @@ -1,4 +1,4 @@ -#if (SHADERPASS != SHADERPASS_FULLSCREEN_DEBUG) +#if (SHADERPASS != SHADERPASS_FULL_SCREEN_DEBUG) #error SHADERPASS_is_not_correctly_define #endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl index df2ab7d8c66..624e5f02dbb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/VertMesh.hlsl @@ -20,7 +20,7 @@ struct PackedVaryingsToPS UNITY_VERTEX_OUTPUT_STEREO #if defined(PLATFORM_SUPPORTS_PRIMITIVE_ID_IN_PIXEL_SHADER) && SHADER_STAGE_FRAGMENT -#if (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG)) +#if (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULL_SCREEN_DEBUG)) uint primitiveID : SV_PrimitiveID; #endif #endif @@ -47,7 +47,7 @@ FragInputs UnpackVaryingsToFragInputs(PackedVaryingsToPS packedInput) FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); #if defined(PLATFORM_SUPPORTS_PRIMITIVE_ID_IN_PIXEL_SHADER) && SHADER_STAGE_FRAGMENT -#if (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG)) +#if (defined(VARYINGS_NEED_PRIMITIVEID) || (SHADERPASS == SHADERPASS_FULL_SCREEN_DEBUG)) input.primitiveID = packedInput.primitiveID; #endif #endif @@ -171,7 +171,7 @@ VaryingsMeshType VertMesh(AttributesMesh input) output.normalWS = normalWS; output.tangentWS = tangentWS; #endif -#if !defined(SHADER_API_METAL) && defined(SHADERPASS) && (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG) +#if !defined(SHADER_API_METAL) && defined(SHADERPASS) && (SHADERPASS == SHADERPASS_FULL_SCREEN_DEBUG) if (_DebugFullScreenMode == FULLSCREENDEBUGMODE_VERTEX_DENSITY) IncrementVertexDensityCounter(output.positionCS); #endif @@ -207,7 +207,7 @@ VaryingsMeshToPS VertMeshTesselation(VaryingsMeshToDS input) output.positionCS = TransformWorldToHClip(input.positionRWS); -#if !defined(SHADER_API_METAL) && defined(SHADERPASS) && (SHADERPASS == SHADERPASS_FULLSCREEN_DEBUG) +#if !defined(SHADER_API_METAL) && defined(SHADERPASS) && (SHADERPASS == SHADERPASS_FULL_SCREEN_DEBUG) if (_DebugFullScreenMode == FULLSCREENDEBUGMODE_VERTEX_DENSITY) IncrementVertexDensityCounter(output.positionCS); #endif From b6ef50ef3aea2bdc604803d417877fa2c8d8436f Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Sat, 24 Oct 2020 14:39:36 +0200 Subject: [PATCH 2/2] Update LightLoop.cs.hlsl --- .../Runtime/Lighting/LightLoop/LightLoop.cs.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl index dc8f41cf636..4c4eeacfcfc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl @@ -136,7 +136,7 @@ float3 GetCenter(SFiniteLightBound value) { return value.center; } -float2 GetScaleXY(SFiniteLightBound value) +float GetScaleXY(SFiniteLightBound value) { return value.scaleXY; }