You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix shader crash when using boolean type for vertex->fragment varyings
This commit is contained in:
@@ -134,6 +134,8 @@ static String _interpstr(SL::DataInterpolation p_interp) {
|
||||
return "flat ";
|
||||
case SL::INTERPOLATION_SMOOTH:
|
||||
return "";
|
||||
case SL::INTERPOLATION_DEFAULT:
|
||||
return "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -667,6 +669,9 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
|
||||
fragment_varyings.insert(varying_name);
|
||||
continue;
|
||||
}
|
||||
if (varying.type < SL::TYPE_INT) {
|
||||
continue; // Ignore boolean types to prevent crashing (if varying is just declared).
|
||||
}
|
||||
|
||||
String vcode;
|
||||
String interp_mode = _interpstr(varying.interpolation);
|
||||
|
||||
Reference in New Issue
Block a user