File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2183,11 +2183,17 @@ void VisualShader::_update_shader() const {
2183
2183
const String temp = String (info.name );
2184
2184
2185
2185
if (!info.options .is_empty ()) {
2186
+ if (!render_mode.is_empty ()) {
2187
+ render_mode += " , " ;
2188
+ }
2189
+ // Always write out a render_mode for the enumerated modes as having no render mode is not always
2190
+ // the same as the default. i.e. for depth_draw_opaque, the render mode has to be declared for it
2191
+ // to work properly, no render mode is an invalid option.
2186
2192
if (modes.has (temp) && modes[temp] < info.options .size ()) {
2187
- if (!render_mode.is_empty ()) {
2188
- render_mode += " , " ;
2189
- }
2190
2193
render_mode += temp + " _" + info.options [modes[temp]];
2194
+ } else {
2195
+ // Use the default.
2196
+ render_mode += temp + " _" + info.options [0 ];
2191
2197
}
2192
2198
} else if (flags.has (temp)) {
2193
2199
flag_names.push_back (temp);
You can’t perform that action at this time.
0 commit comments