Merge pull request #75957 from clayjohn/VS-default-modes
Write out render_mode even when mode is set to default in VisualShaders
This commit is contained in:
commit
d4dad2b2f8
@ -2183,11 +2183,17 @@ void VisualShader::_update_shader() const {
|
|||||||
const String temp = String(info.name);
|
const String temp = String(info.name);
|
||||||
|
|
||||||
if (!info.options.is_empty()) {
|
if (!info.options.is_empty()) {
|
||||||
if (modes.has(temp) && modes[temp] < info.options.size()) {
|
|
||||||
if (!render_mode.is_empty()) {
|
if (!render_mode.is_empty()) {
|
||||||
render_mode += ", ";
|
render_mode += ", ";
|
||||||
}
|
}
|
||||||
|
// Always write out a render_mode for the enumerated modes as having no render mode is not always
|
||||||
|
// the same as the default. i.e. for depth_draw_opaque, the render mode has to be declared for it
|
||||||
|
// to work properly, no render mode is an invalid option.
|
||||||
|
if (modes.has(temp) && modes[temp] < info.options.size()) {
|
||||||
render_mode += temp + "_" + info.options[modes[temp]];
|
render_mode += temp + "_" + info.options[modes[temp]];
|
||||||
|
} else {
|
||||||
|
// Use the default.
|
||||||
|
render_mode += temp + "_" + info.options[0];
|
||||||
}
|
}
|
||||||
} else if (flags.has(temp)) {
|
} else if (flags.has(temp)) {
|
||||||
flag_names.push_back(temp);
|
flag_names.push_back(temp);
|
||||||
|
Loading…
Reference in New Issue
Block a user