Skip to content

Commit

Permalink
Add varying support to visual shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaosus committed Mar 4, 2022
1 parent f356c8a commit 15a87f8
Show file tree
Hide file tree
Showing 9 changed files with 1,277 additions and 32 deletions.
38 changes: 38 additions & 0 deletions doc/classes/VisualShader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
Adds the specified node to the shader.
</description>
</method>
<method name="add_varying">
<return type="void" />
<argument index="0" name="name" type="String" />
<argument index="1" name="mode" type="int" enum="VisualShader.VaryingMode" />
<argument index="2" name="type" type="int" enum="VisualShader.VaryingType" />
<description>
</description>
</method>
<method name="can_connect_nodes" qualifiers="const">
<return type="bool" />
<argument index="0" name="type" type="int" enum="VisualShader.Type" />
Expand Down Expand Up @@ -100,6 +108,12 @@
<description>
</description>
</method>
<method name="has_varying" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="String" />
<description>
</description>
</method>
<method name="is_node_connection" qualifiers="const">
<return type="bool" />
<argument index="0" name="type" type="int" enum="VisualShader.Type" />
Expand All @@ -119,6 +133,12 @@
Removes the specified node from the shader.
</description>
</method>
<method name="remove_varying">
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
</description>
</method>
<method name="replace_node">
<return type="void" />
<argument index="0" name="type" type="int" enum="VisualShader.Type" />
Expand Down Expand Up @@ -182,6 +202,24 @@
<constant name="TYPE_MAX" value="10" enum="Type">
Represents the size of the [enum Type] enum.
</constant>
<constant name="VARYING_MODE_VERTEX_TO_FRAG_LIGHT" value="0" enum="VaryingMode">
</constant>
<constant name="VARYING_MODE_FRAG_TO_LIGHT" value="1" enum="VaryingMode">
</constant>
<constant name="VARYING_MODE_MAX" value="2" enum="VaryingMode">
</constant>
<constant name="VARYING_TYPE_FLOAT" value="0" enum="VaryingType">
</constant>
<constant name="VARYING_TYPE_VECTOR_2D" value="1" enum="VaryingType">
</constant>
<constant name="VARYING_TYPE_VECTOR_3D" value="2" enum="VaryingType">
</constant>
<constant name="VARYING_TYPE_COLOR" value="3" enum="VaryingType">
</constant>
<constant name="VARYING_TYPE_TRANSFORM" value="4" enum="VaryingType">
</constant>
<constant name="VARYING_TYPE_MAX" value="5" enum="VaryingType">
</constant>
<constant name="NODE_ID_INVALID" value="-1">
</constant>
<constant name="NODE_ID_OUTPUT" value="0">
Expand Down
15 changes: 15 additions & 0 deletions doc/classes/VisualShaderNodeVarying.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeVarying" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<members>
<member name="varying_name" type="String" setter="set_varying_name" getter="get_varying_name" default="&quot;[None]&quot;">
</member>
<member name="varying_type" type="int" setter="set_varying_type" getter="get_varying_type" enum="VisualShader.VaryingType" default="0">
</member>
</members>
</class>
9 changes: 9 additions & 0 deletions doc/classes/VisualShaderNodeVaryingGetter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeVaryingGetter" inherits="VisualShaderNodeVarying" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
9 changes: 9 additions & 0 deletions doc/classes/VisualShaderNodeVaryingSetter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeVaryingSetter" inherits="VisualShaderNodeVarying" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
Loading

0 comments on commit 15a87f8

Please sign in to comment.