Ver código fonte

Include alpha in visual shader light function inputs

Lack of access to the alpha accumulator makes some effects that are sensitive to lighting impossible with the visual shader graph. This is an easy fix thankfully as it simply just wasn't exposed.
Max Piepenbrink 6 meses atrás
pai
commit
b28800e580
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      scene/resources/visual_shader.cpp

+ 1 - 0
scene/resources/visual_shader.cpp

@@ -3149,6 +3149,7 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = {
 
 	// Node3D, Light
 	{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "albedo", "ALBEDO" },
+	{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "alpha", "ALPHA" },
 	{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "attenuation", "ATTENUATION" },
 	{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "backlight", "BACKLIGHT" },
 	{ Shader::MODE_SPATIAL, VisualShader::TYPE_LIGHT, VisualShaderNode::PORT_TYPE_SCALAR, "clip_space_far", "CLIP_SPACE_FAR" },