Skip to content

Commit c62afec

Browse files
christing12Evergreen
authored andcommitted
fix blit fallback shader level for webgl 1.0
1 parent eaf5465 commit c62afec

File tree

1 file changed

+3
-3
lines changed
  • Packages/com.unity.render-pipelines.core/Runtime/Utilities

1 file changed

+3
-3
lines changed

Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static void Initialize(Shader blitPS, Shader blitColorAndDepthPS)
6969
s_BlitTexArraySingleSlice.EnableKeyword("BLIT_SINGLE_SLICE");
7070
}
7171

72-
if (SystemInfo.graphicsShaderLevel < 30)
72+
if (SystemInfo.graphicsShaderLevel <= 30)
7373
{
7474
/*UNITY_NEAR_CLIP_VALUE*/
7575
float nearClipZ = -1;
@@ -186,15 +186,15 @@ static public Material GetBlitMaterial(TextureDimension dimension, bool singleSl
186186

187187
static private void DrawTriangle(CommandBuffer cmd, Material material, int shaderPass)
188188
{
189-
if (SystemInfo.graphicsShaderLevel < 30)
189+
if (SystemInfo.graphicsShaderLevel <= 30)
190190
cmd.DrawMesh(s_TriangleMesh, Matrix4x4.identity, material, 0, shaderPass, s_PropertyBlock);
191191
else
192192
cmd.DrawProcedural(Matrix4x4.identity, material, shaderPass, MeshTopology.Triangles, 3, 1, s_PropertyBlock);
193193
}
194194

195195
static internal void DrawQuad(CommandBuffer cmd, Material material, int shaderPass)
196196
{
197-
if (SystemInfo.graphicsShaderLevel < 30)
197+
if (SystemInfo.graphicsShaderLevel <= 30)
198198
cmd.DrawMesh(s_QuadMesh, Matrix4x4.identity, material, 0, shaderPass, s_PropertyBlock);
199199
else
200200
cmd.DrawProcedural(Matrix4x4.identity, material, shaderPass, MeshTopology.Quads, 4, 1, s_PropertyBlock);

0 commit comments

Comments
 (0)