Skip to content
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

Internal/master #8015

Merged
merged 33 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7b122b1
[UIT-2237]: Reverting the new Contextual Menu feature.
freddy-cheungh Dec 12, 2023
13ba7b6
2d/staging/tilemap/uum53666
ChuanXin-Unity Dec 12, 2023
52d453d
[HDRP] Various fixes
adrien-de-tocqueville Dec 12, 2023
6094ffc
Render Graph compilation caching.
JulienIgnace-Unity Dec 12, 2023
158e6c5
[VFX/SG] Fix Custom HLSL
PaulDemeulenaere Dec 12, 2023
3872cf5
Graphics/SRP/RPF - RG Opt 1 - Using UnityEngine.Pool for RenderGraphO…
axoloto Dec 12, 2023
3c6b8bf
[Bug UUM-58488] Fix typos, misspellings, & inaccuracies in Node Refer…
bencloward Dec 12, 2023
766c1dc
Graphics/hd/fix/56870 Sky occlusion: tooltips and documentation updat…
arthur-dufay Dec 13, 2023
9e53df8
[URP]Implementing uUniversalRenderPipelinePostProcessDataUsage Analytic.
alex-vazquez-unity3d Dec 13, 2023
3b9d2d9
[2023.3][URP] Fixing decals not affecting grass when using Deferred R…
ellioman Dec 13, 2023
187c3d9
Fix UUM-58354 by splitting up large probe jobs
pigselated Dec 13, 2023
0cdb567
[URP][2023.3] Fixing an issue where SSAO feature can not be disabled …
ellioman Dec 13, 2023
3215702
[HDRP][Docs] Fix Water burst script having compilation issues
remi-chapelain Dec 13, 2023
1de0c11
[HDRP] Correct rayrtacing limitation documentation
sebastienlagarde Dec 13, 2023
4fcaf12
[2023.3][URP] Make ValidateRendererFeatures() use IsSubclassOf instea…
ellioman Dec 13, 2023
88f4e29
Fix rendering debugger null exception on render graph path.
eh-unity Dec 13, 2023
a61a8db
Fix Some Warnings in 32-bit STP Path
gmitrano-unity Dec 13, 2023
ee880a6
[SRP] Add XR for Data Driven Lens Flare
Dec 15, 2023
43866ac
[Graphics][URP][Bugfix][Trunk] Foward+ Reflection Probe GL y-flip fix
Nzollner Dec 15, 2023
2c6583d
[VFX] Particle strips missing functionality
gabrieldelacruz Dec 15, 2023
e791836
[VFX] Fix Sample Camera Buffer in Dispatch
PaulDemeulenaere Dec 15, 2023
d607c2d
Add Profiling Markers for RecordRenderGraph
RoseHirigoyen Dec 15, 2023
94cd81f
Remove one of duplicate dependencies from RP Core to com.unity.collec…
arttu-peltonen Dec 15, 2023
cf0d2a8
Added HDRP stencil documentation page
alelievr Dec 15, 2023
6a5a847
[POI-817] Optimize RenderGraph CPU cost by converting Bloom from many…
eh-unity Dec 16, 2023
9c302f1
[HDRP] Fix raytraced shadow denoising on box lights
pjbunity Dec 16, 2023
4861fd7
Documentation/staging
RobJessop Dec 16, 2023
a53e0ee
Graphics/SRP/RPF - RG Opt 2 - No more buffers clearing in RenderGraph…
axoloto Dec 19, 2023
5577d27
[URP] Fix SSAO + DBuffer global texture
mcc-unity Dec 19, 2023
7ff3ddc
Fixed a null ref exception when baking APV without GPU streaming enab…
JulienIgnace-Unity Dec 19, 2023
646c007
[HDRP] Update What's new 17 documentation page
sebastienlagarde Dec 20, 2023
229c766
Graphics/SRP/RPF - RG Opt 3 - Disable Render Graph Validation Checks …
axoloto Dec 20, 2023
b883dcf
[VFX] Fixed two unexpected console messages
julienamsellem Dec 20, 2023
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
Prev Previous commit
Next Next commit
[2023.3][URP] Fixing decals not affecting grass when using Deferred R…
…endering (UUM-21928)

Fixes UUM-21928 by adding GBuffer passes to the Grass and GrassBillboard shaders.
  • Loading branch information
ellioman authored and Evergreen committed Dec 13, 2023
commit 3b9d2d91c9e7282a18930487f04d8fd989c8b8e1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Shader "Hidden/TerrainEngine/Details/UniversalPipeline/WavingDoublePass"

Pass
{
Name "ForwardLit"
Tags
{
"LightMode" = "UniversalForward"
}
AlphaToMask On

HLSLPROGRAM
Expand Down Expand Up @@ -59,6 +64,54 @@ Shader "Hidden/TerrainEngine/Details/UniversalPipeline/WavingDoublePass"
ENDHLSL
}

Pass
{
Name "GBuffer"
Tags
{
"LightMode" = "UniversalGBuffer"
}

HLSLPROGRAM
#pragma target 4.5

// Deferred Rendering Path does not support the OpenGL-based graphics API:
// Desktop OpenGL, OpenGL ES 3.0, WebGL 2.0.
#pragma exclude_renderers gles3 glcore

// -------------------------------------
// Universal Pipeline keywords
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
#pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH
#pragma multi_compile_fragment _ _LIGHT_COOKIES
#pragma multi_compile_fragment _ _RENDER_PASS_ENABLED
#pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ProbeVolumeVariants.hlsl"

// -------------------------------------
// Unity defined keywords
#pragma multi_compile _ LIGHTMAP_ON
#pragma multi_compile _ SHADOWS_SHADOWMASK
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING

//--------------------------------------
// GPU Instancing
#pragma multi_compile_instancing
#pragma instancing_options renderinglayer

#pragma vertex WavingGrassVert
#pragma fragment LitPassFragmentGrass
#define _ALPHATEST_ON
#define TERRAIN_GBUFFER

#include "Packages/com.unity.render-pipelines.universal/Shaders/Terrain/WavingGrassInput.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Shaders/Terrain/WavingGrassPasses.hlsl"

ENDHLSL
}

Pass
{
Name "DepthOnly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Shader "Hidden/TerrainEngine/Details/UniversalPipeline/BillboardWavingDoublePass

Pass
{
Name "ForwardLit"
Tags
{
"LightMode" = "UniversalForward"
}
AlphaToMask On

HLSLPROGRAM
Expand Down Expand Up @@ -52,6 +57,48 @@ Shader "Hidden/TerrainEngine/Details/UniversalPipeline/BillboardWavingDoublePass
ENDHLSL
}

Pass
{
Name "GBuffer"
Tags
{
"LightMode" = "UniversalGBuffer"
}

HLSLPROGRAM
#pragma target 4.5

// Deferred Rendering Path does not support the OpenGL-based graphics API:
// Desktop OpenGL, OpenGL ES 3.0, WebGL 2.0.
#pragma exclude_renderers gles3 glcore

// -------------------------------------
// Universal Pipeline keywords
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
#pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH
#pragma multi_compile_fragment _ _RENDER_PASS_ENABLED
#pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"

// -------------------------------------
// Unity defined keywords
#pragma multi_compile _ SHADOWS_SHADOWMASK
#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING

//--------------------------------------
// GPU Instancing
#pragma multi_compile_instancing

#pragma vertex WavingGrassBillboardVert
#pragma fragment LitPassFragmentGrass
#define _ALPHATEST_ON
#define TERRAIN_GBUFFER

#include "Packages/com.unity.render-pipelines.universal/Shaders/Terrain/WavingGrassInput.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Shaders/Terrain/WavingGrassPasses.hlsl"
ENDHLSL
}

Pass
{
Name "DepthOnly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,13 @@ half4 DepthNormalOnlyFragment(GrassVertexDepthNormalOutput input) : SV_TARGET
{
Alpha(SampleAlbedoAlpha(input.uv, TEXTURE2D_ARGS(_MainTex, sampler_MainTex)).a, input.color, _Cutoff);
#if defined(_GBUFFER_NORMALS_OCT)
float3 normalWS = normalize(input.normal);
float3 normalWS = NormalizeNormalPerPixel(input.normal);
float2 octNormalWS = PackNormalOctQuadEncode(normalWS); // values between [-1, +1], must use fp32 on Nintendo Switch.
float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5); // values between [ 0, 1]
half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS); // values between [ 0, 1]
return half4(packedNormalWS, 0.0);
#else
half3 normalWS = half3(normalize(cross(ddy(input.viewDirWS), ddx(input.viewDirWS))));
return half4(normalWS, 0.0);
return half4(NormalizeNormalPerPixel(input.normal), 0.0);
#endif
}

Expand Down