diff options
author | reduz <reduzio@gmail.com> | 2021-08-18 12:18:50 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-08-18 12:20:19 -0300 |
commit | 700f9d916d41ca9ea8eb9213dbce716fe802f600 (patch) | |
tree | 7d82f988cd2ce8da39b034642ba71de2d1386d6f /servers/rendering/shader_language.cpp | |
parent | 2a9c4a59dfd2d0f25e2789d8339f91f97f5dd2bb (diff) |
More fixes to mobile renderer
* Specify all precision qualifiers
* Makes renderer work on Adreno Vulkan
Diffstat (limited to 'servers/rendering/shader_language.cpp')
-rw-r--r-- | servers/rendering/shader_language.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 20fcb1396d..4218214fda 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -2877,6 +2877,27 @@ bool ShaderLanguage::is_scalar_type(DataType p_type) { return p_type == TYPE_BOOL || p_type == TYPE_INT || p_type == TYPE_UINT || p_type == TYPE_FLOAT; } +bool ShaderLanguage::is_float_type(DataType p_type) { + switch (p_type) { + case TYPE_FLOAT: + case TYPE_VEC2: + case TYPE_VEC3: + case TYPE_VEC4: + case TYPE_MAT2: + case TYPE_MAT3: + case TYPE_MAT4: + case TYPE_SAMPLER2D: + case TYPE_SAMPLER2DARRAY: + case TYPE_SAMPLER3D: + case TYPE_SAMPLERCUBE: + case TYPE_SAMPLERCUBEARRAY: { + return true; + } + default: { + return false; + } + } +} bool ShaderLanguage::is_sampler_type(DataType p_type) { return p_type == TYPE_SAMPLER2D || p_type == TYPE_ISAMPLER2D || |