Fix texture samplers to not being last in the property list

This commit is contained in:
Yuri Rubinsky 2024-07-26 12:19:13 +03:00
parent 88d9325065
commit e41048e16e
6 changed files with 18 additions and 21 deletions

View file

@ -922,7 +922,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
if (shader->uniforms.has(vnode->name)) {
//its a uniform!
const ShaderLanguage::ShaderNode::Uniform &u = shader->uniforms[vnode->name];
if (u.texture_order >= 0) {
if (u.is_texture()) {
StringName name;
if (u.hint == ShaderLanguage::ShaderNode::Uniform::HINT_SCREEN_TEXTURE) {
name = "color_buffer";
@ -1039,7 +1039,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
if (shader->uniforms.has(anode->name)) {
//its a uniform!
const ShaderLanguage::ShaderNode::Uniform &u = shader->uniforms[anode->name];
if (u.texture_order >= 0) {
if (u.is_texture()) {
code = _mkid(anode->name); //texture, use as is
} else {
//a scalar or vector