Prevent GLES2 bool uniforms from having a precision type set.
When setting the default precision type for uniforms (before compiling the shader) prevent boolean uniforms from having one set. Booleans can't have a precision type and on some Android devices this caused a compilation failure. Fixes #30317
This commit is contained in:
parent
550f436f8f
commit
10f1e0f63a
|
@ -318,7 +318,7 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener
|
||||||
|
|
||||||
// use highp if no precision is specified to prevent different default values in fragment and vertex shader
|
// use highp if no precision is specified to prevent different default values in fragment and vertex shader
|
||||||
SL::DataPrecision precision = E->get().precision;
|
SL::DataPrecision precision = E->get().precision;
|
||||||
if (precision == SL::PRECISION_DEFAULT) {
|
if (precision == SL::PRECISION_DEFAULT && E->get().type != SL::TYPE_BOOL) {
|
||||||
precision = SL::PRECISION_HIGHP;
|
precision = SL::PRECISION_HIGHP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue