1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

More fixes to mobile renderer

* Specify all precision qualifiers
* Makes renderer work on Adreno Vulkan
This commit is contained in:
reduz
2021-08-18 12:18:50 -03:00
parent 2a9c4a59df
commit 700f9d916d
7 changed files with 125 additions and 108 deletions

View File

@@ -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 ||