diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 7986dc8671f..d2c68d8b6fc 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Multiply blend now keeps DstAlpha as it's RGB only. - Particle AlphaModulate() renamed to AlphaModulateAndPremultiply() as it does both. Moved separate AlphaModulate() and AlphaPremultiply() to URP shader library. Fix double alpha multiply for ParticleLit. - Improved blending modes trigger a material update which tries to keep the existing look intact. This is not always possible and manual blend mode changes might be required. +- Changed "_USE_DRAW_PROCEDURAL" to be used only in vertex shader in Post Processing related shaders as they are not needed for fragment shaders. In result we now generate less shader variants. ### Fixed - Fixed incorrect premultiply blend mode. case 1260085, case 1357703, [case 1347301](https://issuetracker.unity3d.com/product/unity/issues/guid/1347301/) diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/Bloom.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/Bloom.shader index 8bf80d133da..ba1cbcbb017 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/Bloom.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/Bloom.shader @@ -3,7 +3,7 @@ Shader "Hidden/Universal Render Pipeline/Bloom" HLSLINCLUDE #pragma exclude_renderers gles #pragma multi_compile_local _ _USE_RGBM - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/BokehDepthOfField.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/BokehDepthOfField.shader index 4ef6283f48a..f41b031a447 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/BokehDepthOfField.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/BokehDepthOfField.shader @@ -3,7 +3,7 @@ Shader "Hidden/Universal Render Pipeline/BokehDepthOfField" HLSLINCLUDE #pragma exclude_renderers gles #pragma multi_compile_local_fragment _ _USE_FAST_SRGB_LINEAR_CONVERSION - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/CameraMotionBlur.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/CameraMotionBlur.shader index 900497f3a10..dd95925dee8 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/CameraMotionBlur.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/CameraMotionBlur.shader @@ -3,7 +3,7 @@ Shader "Hidden/Universal Render Pipeline/CameraMotionBlur" HLSLINCLUDE #pragma exclude_renderers gles - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Random.hlsl" diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/FinalPost.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/FinalPost.shader index f3b0f279f5a..1f407e44afe 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/FinalPost.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/FinalPost.shader @@ -6,7 +6,7 @@ Shader "Hidden/Universal Render Pipeline/FinalPost" #pragma multi_compile_local_fragment _ _FILM_GRAIN #pragma multi_compile_local_fragment _ _DITHERING #pragma multi_compile_local_fragment _ _LINEAR_TO_SRGB_CONVERSION - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #pragma multi_compile_fragment _ DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/GaussianDepthOfField.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/GaussianDepthOfField.shader index 4342a30ea86..1a3f82658c8 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/GaussianDepthOfField.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/GaussianDepthOfField.shader @@ -4,7 +4,7 @@ Shader "Hidden/Universal Render Pipeline/GaussianDepthOfField" #pragma target 3.5 #pragma exclude_renderers gles - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/PaniniProjection.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/PaniniProjection.shader index 36c7e73346b..d2c282e1fd5 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/PaniniProjection.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/PaniniProjection.shader @@ -5,7 +5,7 @@ Shader "Hidden/Universal Render Pipeline/PaniniProjection" #pragma exclude_renderers gles #pragma multi_compile_local _GENERIC _UNIT_DISTANCE - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/Common.hlsl" diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/StopNaN.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/StopNaN.shader index 9a41155deee..791525a7ef4 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/StopNaN.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/StopNaN.shader @@ -2,7 +2,7 @@ Shader "Hidden/Universal Render Pipeline/Stop NaN" { HLSLINCLUDE #pragma exclude_renderers gles - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #pragma exclude_renderers gles #pragma target 3.5 diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/SubpixelMorphologicalAntialiasing.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/SubpixelMorphologicalAntialiasing.shader index 132340687ca..4dbb4dfcc1f 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/SubpixelMorphologicalAntialiasing.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/SubpixelMorphologicalAntialiasing.shader @@ -9,7 +9,7 @@ Shader "Hidden/Universal Render Pipeline/SubpixelMorphologicalAntialiasing" HLSLINCLUDE #pragma multi_compile_local _SMAA_PRESET_LOW _SMAA_PRESET_MEDIUM _SMAA_PRESET_HIGH - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #pragma exclude_renderers gles ENDHLSL diff --git a/com.unity.render-pipelines.universal/Shaders/PostProcessing/UberPost.shader b/com.unity.render-pipelines.universal/Shaders/PostProcessing/UberPost.shader index 11416a8aab5..bf6c5bf3311 100644 --- a/com.unity.render-pipelines.universal/Shaders/PostProcessing/UberPost.shader +++ b/com.unity.render-pipelines.universal/Shaders/PostProcessing/UberPost.shader @@ -10,7 +10,7 @@ Shader "Hidden/Universal Render Pipeline/UberPost" #pragma multi_compile_local_fragment _ _DITHERING #pragma multi_compile_local_fragment _ _LINEAR_TO_SRGB_CONVERSION #pragma multi_compile_local_fragment _ _USE_FAST_SRGB_LINEAR_CONVERSION - #pragma multi_compile _ _USE_DRAW_PROCEDURAL + #pragma multi_compile_vertex _ _USE_DRAW_PROCEDURAL #pragma multi_compile_fragment _ DEBUG_DISPLAY #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"