Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -477,6 +477,7 @@ public static void SetupMaterialBlendMode(Material material)
// General Transparent Material Settings
material.SetOverrideTag("RenderType", "Transparent");
material.SetInt("_ZWrite", 0);
material.renderQueue = (int)RenderQueue.Transparent;
material.renderQueue += material.HasProperty("_QueueOffset") ? (int) material.GetFloat("_QueueOffset") : 0;
material.SetShaderPassEnabled("ShadowCaster", false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ Shader "Hidden/Universal Render Pipeline/BokehDepthOfField"

uint w;
uint h;
#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)
#if defined(SHADER_API_GLCORE)
// GetDimensions will use textureQueryLevels in OpenGL and that's not
// supported in OpenGL 4.1 or below. In that case we use _MainTex_TexelSize
// which is fine as we don't support dynamic scaling in OpenGL.
w = _MainTex_TexelSize.z;
h = _MainTex_TexelSize.w;
#elif defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)
uint x;
_CameraDepthTexture.GetDimensions(w, h, x);
#else
Expand Down Expand Up @@ -305,7 +311,7 @@ Shader "Hidden/Universal Render Pipeline/BokehDepthOfField"
// SM3.5 fallbacks - needed because of the use of Gather
SubShader
{
Tags { "RenderPipeline" = "LightweightPipeline" }
Tags { "RenderPipeline" = "UniversalPipeline" }
LOD 100
ZTest Always ZWrite Off Cull Off

Expand Down