Add Explicit Int Precision for GLSL ES Backend

This commit is contained in:
Zicklag 2021-07-19 17:53:06 -05:00 committed by Dzmitry Malyshau
parent 7b9b56a6ab
commit 34b486f74b
15 changed files with 16 additions and 1 deletions

View File

@ -409,11 +409,12 @@ impl<'a, W: Write> Writer<'a, W> {
writeln!(self.out, "#extension GL_EXT_texture_shadow_lod : require")?;
}
// glsl es requires a precision to be specified for floats
// glsl es requires a precision to be specified for floats and ints
// TODO: Should this be user configurable?
if es {
writeln!(self.out)?;
writeln!(self.out, "precision highp float;")?;
writeln!(self.out, "precision highp int;")?;
writeln!(self.out)?;
}

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
struct type10 {
vec2 member;

View File

@ -1,6 +1,7 @@
#version 300 es
precision highp float;
precision highp int;
struct VertexOutput {
vec2 uv;

View File

@ -1,6 +1,7 @@
#version 300 es
precision highp float;
precision highp int;
struct VertexOutput {
vec2 uv;

View File

@ -1,6 +1,7 @@
#version 300 es
precision highp float;
precision highp int;
struct VertexOutput {
vec2 uv;

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
struct Light {
mat4x4 proj;

View File

@ -1,6 +1,7 @@
#version 320 es
precision highp float;
precision highp int;
struct VertexOutput {
vec4 position;

View File

@ -1,6 +1,7 @@
#version 320 es
precision highp float;
precision highp int;
struct VertexOutput {
vec4 position;

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
layout(location = 0) out vec4 _fs2p_location0;

View File

@ -1,6 +1,7 @@
#version 310 es
precision highp float;
precision highp int;
uniform highp sampler2D _group_0_binding_0;