From 05dfe4c1fda91396329ce3a38016639466891c50 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Fri, 20 Oct 2023 19:19:24 +0530 Subject: [PATCH] Update NodeScaleWorld.gd Adjusted availability of the node for shader modes and shader processors --- addons/ShaderLib/Input/NodeScaleWorld.gd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/ShaderLib/Input/NodeScaleWorld.gd b/addons/ShaderLib/Input/NodeScaleWorld.gd index 7cb3313..a138ff5 100644 --- a/addons/ShaderLib/Input/NodeScaleWorld.gd +++ b/addons/ShaderLib/Input/NodeScaleWorld.gd @@ -28,6 +28,15 @@ func _get_output_port_name(port: int) -> String: func _get_output_port_type(port: int) -> VisualShaderNode.PortType: return PORT_TYPE_VECTOR_3D +func _is_available(mode: Shader.Mode, type: VisualShader.Type) -> bool: + match mode: + 0: + return true + 1: + return type==0 + _: + return false + func _get_global_code(mode: Shader.Mode) -> String: var code: String = preload("NodeScaleWorld.gdshaderinc").code return code