diff options
author | clayjohn <claynjohn@gmail.com> | 2022-05-10 10:02:44 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-05-12 10:37:27 -0700 |
commit | 652adcd5bfc569b93d8da3d1539f9a030d065eb7 (patch) | |
tree | a6f211776d4c111a0c1247c5390fd9877ff301f5 /drivers/gles3/shader_gles3.cpp | |
parent | 2bf8831dd62c7ef4977a23e93cb58a9d1f929bd9 (diff) | |
download | redot-engine-652adcd5bfc569b93d8da3d1539f9a030d065eb7.tar.gz |
Basic 3D rendering
Diffstat (limited to 'drivers/gles3/shader_gles3.cpp')
-rw-r--r-- | drivers/gles3/shader_gles3.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index e356fa8c1f..b3f37207da 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -171,6 +171,15 @@ void ShaderGLES3::_build_variant_code(StringBuilder &builder, uint32_t p_variant } builder.append("\n"); //make sure defines begin at newline + // Default to highp precision unless specified otherwise. + builder.append("precision highp float;\n"); + builder.append("precision highp int;\n"); +#ifndef GLES_OVER_GL + builder.append("precision highp sampler2D;\n"); + builder.append("precision highp samplerCube;\n"); + builder.append("precision highp sampler2DArray;\n"); +#endif + for (uint32_t i = 0; i < p_template.chunks.size(); i++) { const StageTemplate::Chunk &chunk = p_template.chunks[i]; switch (chunk.type) { |