Merge pull request #73691 from Chaosus/vs_depth
Add DEPTH to the visual shader output (for spatial mode)
This commit is contained in:
commit
53d0e6c2d5
|
@ -3645,6 +3645,8 @@ const VisualShaderNodeOutput::Port VisualShaderNodeOutput::ports[] = {
|
|||
{ Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Alpha AA Edge", "ALPHA_ANTIALIASING_EDGE" },
|
||||
{ Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_2D, "Alpha UV", "ALPHA_TEXTURE_COORDINATE" },
|
||||
|
||||
{ Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR, "Depth", "DEPTH" },
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Node3D, Light.
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@ -3768,7 +3770,7 @@ bool VisualShaderNodeOutput::is_port_separator(int p_index) const {
|
|||
}
|
||||
if (shader_mode == Shader::MODE_SPATIAL && shader_type == VisualShader::TYPE_FRAGMENT) {
|
||||
String port_name = get_input_port_name(p_index);
|
||||
return bool(port_name == "AO" || port_name == "Normal" || port_name == "Rim" || port_name == "Clearcoat" || port_name == "Anisotropy" || port_name == "Subsurf Scatter" || port_name == "Alpha Scissor Threshold");
|
||||
return bool(port_name == "AO" || port_name == "Normal" || port_name == "Rim" || port_name == "Clearcoat" || port_name == "Anisotropy" || port_name == "Subsurf Scatter" || port_name == "Alpha Scissor Threshold" || port_name == "Depth");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue