Editable Code
Updated: 11 Jul 2024
Generates a shape for a procedural system from custom code.Updated: 11 Jul 2024
Generates a shape for a procedural system from custom code.This node allows a custom piece of HLSL code to be written to produce a distance value from which a procedural shape will be created. For best results with this node you should have a working knowledge of the HLSL shading language, and signed distance fields.
IMPORTANT: The custom code is inserted into a larger HLSL function, and therefore creating functions is not supported.
localPos.y += param2 * sin( 1.0 * localPos.x + param1 * 2.4 ) * param0;
localPos.x += param2 * sin( 1.0 * localPos.z + param1 * 2.4 ) * param0;
sdfValue = length(max(abs(localPos) - 1.0, 0.0 ));
Nodes connected to this node will generally follow the parent child hierarchy. Other Procedural Generator nodes can be configured to combine with this shape using their CSG modes, and displacement nodes will only apply to this shape.
These properties control the 3D transforms of the node. Transforms will generally be inherited by child nodes, although they can be ignored through the Inherit Transform Channels attributes.
Parameter | Details |
---|---|
Position X | The objects position along the local x-axis. |
Position Y | The objects position along the local y-axis. |
Position Z | The objects position along the local z-axis. |
Rotation Heading | The objects rotation around the local y-axis. |
Rotation Pitch | The objects rotation around the local x-axis. |
Rotation Bank | The objects rotation around the local z-axis. |
Scale X | The objects scale along the local x-axis. |
Scale Y | The objects scale along the local y-axis. |
Scale Z | The objects scale along the local z-axis. |
Control the inheritance of the transforms from the parent.
Parameter | Details |
---|---|
Position | Toggle inheritance of the Position from the parent. |
Rotation | Toggle inheritance of the Rotation from the parent. |
Scale | Toggle inheritance of the Scale from the parent. |
World Position Only | Inherit the world position from the parent only, rotation and scale will be ignored. Overrides above properties. |
Inherit Time | Toggle inheritance of time from the parent. |
These properties control the core behaviours of the node.
Parameter | Details |
---|---|
Code | Type your code here |
Param 0 | Variable that can be used in the code |
Param 1 | Variable that can be used in the code |
Param 2 | Variable that can be used in the code |
CSG Mode | These options change how a this procedural node combines with the existing of the procedural system.
|
CSG Blend Weight | How much the new procedural blends with the old procedurals, depending on the CSG Blend Weight. |
Affect Colour | Affect the colour of the generated procedural system. only functions with ‘Generate Colours’ enabled in some Procedural Render nodes. |
Always Enabled | When enabled, this node will run regardless of time bar enable/disable. Due to how Notch handles shader generation with procedurals, with this enabled the node runs more efficiently. |
Material Colour | Modify the colour for the procedural material. |
Custom CSG Code | Type your Custom code here, using the HLSL language. Read more on Editable Code. |
Name | Description | Typical Input |
---|---|---|
Transform Modifiers | Apply the transforms of another node to this node. | Null |
Target Node | Modifiy the rotations of the node to always direct the z axis towards the input. | Null |
Local Transform Override | Apply the transforms of another node to this node, relative to its parent. | Null |