mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Emit normal_roughness compatibility code in custom functions
This commit is contained in:
parent
607b230ffe
commit
ba3457dfff
3 changed files with 52 additions and 43 deletions
|
|
@ -1286,6 +1286,13 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
|
|||
break;
|
||||
}
|
||||
if (function->arguments[j].tex_argument_check) {
|
||||
if (function->arguments[j].tex_hint == ShaderLanguage::ShaderNode::Uniform::HINT_SCREEN_TEXTURE) {
|
||||
is_screen_texture = true;
|
||||
} else if (function->arguments[j].tex_hint == ShaderLanguage::ShaderNode::Uniform::HINT_DEPTH_TEXTURE) {
|
||||
is_depth_texture = true;
|
||||
} else if (function->arguments[j].tex_hint == ShaderLanguage::ShaderNode::Uniform::HINT_NORMAL_ROUGHNESS_TEXTURE) {
|
||||
is_normal_roughness_texture = true;
|
||||
}
|
||||
sampler_name = _get_sampler_name(function->arguments[j].tex_argument_filter, function->arguments[j].tex_argument_repeat);
|
||||
found = true;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue