From 199f4a772ad878b45784282d87573c318cb6b46c Mon Sep 17 00:00:00 2001 From: Digvijaysinh Gohil Date: Sat, 28 Sep 2024 00:07:16 +0530 Subject: [PATCH] HeightToNormal node documentation added --- documentation/Documentation.md | 1 + .../Nodes/Procedural/HeightToNormal.md | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 documentation/Nodes/Procedural/HeightToNormal.md diff --git a/documentation/Documentation.md b/documentation/Documentation.md index b55c4c3..dbebbf4 100644 --- a/documentation/Documentation.md +++ b/documentation/Documentation.md @@ -56,6 +56,7 @@ For example if you want to rotate UV in your **_.gdshader_** file, you can use `

Procedural nodes

 Checker Board node

+

 Height To Normal node

 Fractals

diff --git a/documentation/Nodes/Procedural/HeightToNormal.md b/documentation/Nodes/Procedural/HeightToNormal.md new file mode 100644 index 0000000..b56e63d --- /dev/null +++ b/documentation/Nodes/Procedural/HeightToNormal.md @@ -0,0 +1,29 @@ +# Height To Normal node +Generates a normal map from a height map. +
+ +**Inputs** +|Name|Type|Binding|Description| +|---|---|---|---| +|height map|sampler2D|none|Height map| +|uv|vec2|UV|Input UV value| +|bump strength|float|none|Bump strength for the height| + +**Outputs** +|Name|Type|Binding|Description| +|---|---|---|---| +|Normal|vec3|None|Normal map| + +**ShaderInc location** +
`res://addons/ShaderLib/Procedural/Procedural.gdshaderinc` + +**Method signature** +
`vec3 heigth_to_normal(sampler2D height_map, vec2 uv, float bump_strength)` + +**Parameters** +|Name|Type|Description| +|---|---|---| +|height_map|sampler2D|Height map| +|uv|vec2|Input UV value| +|bump_strength|float|Bump strength for the height| +___ \ No newline at end of file