mirror of
https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git
synced 2025-09-20 04:15:58 +08:00
Documentation for Parallax mapping node added
This commit is contained in:
17
README.md
17
README.md
@ -307,6 +307,23 @@ This node can be used to create a texture animation functionality, commonly used
|
|||||||
|end frame|int|none|End tile index texture sheet|
|
|end frame|int|none|End tile index texture sheet|
|
||||||
|anim speed|float|none|Animation speed|
|
|anim speed|float|none|Animation speed|
|
||||||
|
|
||||||
|
**Outputs**
|
||||||
|
|Name|Type|Binding|Description|
|
||||||
|
|---|---|---|---|
|
||||||
|
|uv|vec2|None|Output UV value|
|
||||||
|
___
|
||||||
|
</details>
|
||||||
|
<details>
|
||||||
|
<summary><h3>Parallax mapping node</h3></summary>
|
||||||
|
The Parallax Mapping node lets you create a parallax effect that displaces a Material's UVs to create the illusion of depth inside a Material.<br><br><i>This node is only available in shader modes SPATIAL and CANVAS ITEM.</i>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
**Inputs**
|
||||||
|
|Name|Type|Binding|Description|
|
||||||
|
|---|---|---|---|
|
||||||
|
|height map|sampler2D|none|Height map texture|
|
||||||
|
|amplitude|float|none|amplitude or depth of the effect|
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|Name|Type|Binding|Description|
|
|Name|Type|Binding|Description|
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|
@ -43,6 +43,13 @@ func _get_output_port_name(port: int) -> String:
|
|||||||
func _get_output_port_type(port: int) -> VisualShaderNode.PortType:
|
func _get_output_port_type(port: int) -> VisualShaderNode.PortType:
|
||||||
return PORT_TYPE_VECTOR_2D
|
return PORT_TYPE_VECTOR_2D
|
||||||
|
|
||||||
|
func _is_available(mode: Shader.Mode, type: VisualShader.Type) -> bool:
|
||||||
|
match mode:
|
||||||
|
0, 1:
|
||||||
|
return true
|
||||||
|
_:
|
||||||
|
return false
|
||||||
|
|
||||||
func _get_global_code(mode: Shader.Mode) -> String:
|
func _get_global_code(mode: Shader.Mode) -> String:
|
||||||
var code: String = preload("ParallaxMappingUV.gdshaderinc").code
|
var code: String = preload("ParallaxMappingUV.gdshaderinc").code
|
||||||
return code
|
return code
|
||||||
|
Reference in New Issue
Block a user