Merge pull request #50881 from Chaosus/shader_fix_build

Fix compilation of `shader_language.cpp`
This commit is contained in:
Rémi Verschelde 2021-07-26 13:12:26 +02:00 committed by GitHub
commit 04fd284a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3373,7 +3373,7 @@ bool ShaderLanguage::_validate_varying_using(ShaderNode::Varying &p_varying, Str
bool ShaderLanguage::_check_varying_usages(int *r_error_line, String *r_error_message) const { bool ShaderLanguage::_check_varying_usages(int *r_error_line, String *r_error_message) const {
for (const List<ShaderLanguage::VaryingUsage>::Element *E = unknown_varying_usages.front(); E; E = E->next()) { for (const List<ShaderLanguage::VaryingUsage>::Element *E = unknown_varying_usages.front(); E; E = E->next()) {
ShaderNode::Varying::Stage stage = E->get().var->stage; ShaderNode::Varying::Stage stage = E->get().var->stage;
if (stage != ShaderNode::Varying::STAGE_UNKNOWN && stage != ShaderNode::Varying::STAGE_VERTEX && stage != ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT && stage != ShaderNode::Varying::STAGE_VERTEX_TO_LIGHT) { if (stage != ShaderNode::Varying::STAGE_UNKNOWN && stage != ShaderNode::Varying::STAGE_VERTEX && stage != ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT_LIGHT) {
*r_error_line = E->get().line; *r_error_line = E->get().line;
*r_error_message = RTR("Fragment-stage varying could not been accessed in custom function!"); *r_error_message = RTR("Fragment-stage varying could not been accessed in custom function!");
return false; return false;