Browse Source

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 tháng trước cách đây
mục cha
commit
b28800e580
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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" },