diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-18 17:03:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-18 17:03:10 +0100 |
commit | 17ee8d0465726fc7b6b657a5d14bda46565edf33 (patch) | |
tree | c6125153b7462b7dd88605830d423de474f584d6 /servers/visual/shader_language.cpp | |
parent | 4f10d47f19f40e6cf1d85e9462b5417991dbced2 (diff) | |
parent | 6c3be2ca74bdfb0cc133529749fac1112df26945 (diff) |
Merge pull request #33706 from madmiraal/fix-c4146-warning
Fix Visual Studio throwing C4146 warning.
Diffstat (limited to 'servers/visual/shader_language.cpp')
-rw-r--r-- | servers/visual/shader_language.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 9babc99349..316a94556d 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -3769,8 +3769,8 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha nv.sint = -cn->values[i].sint; } break; case TYPE_UINT: { - // FIXME: This can't work on uint - nv.uint = -cn->values[i].uint; + // Intentionally wrap the unsigned int value, because GLSL does. + nv.uint = 0 - cn->values[i].uint; } break; case TYPE_FLOAT: { nv.real = -cn->values[i].real; |