1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-20 12:25:59 +08:00

Parallax Mapping node finalized

This commit is contained in:
Digvijaysinh Gohil
2023-12-24 20:18:30 +05:30
parent 9b79e5fca3
commit 8b1f8d246e
3 changed files with 18 additions and 13 deletions

View File

@ -52,5 +52,4 @@ func _get_code(input_vars: Array[String], output_vars: Array[String], mode: Shad
var amplitude: String = input_vars[1]
if !height_map:
return output_vars[0] + " = UV;"
return output_vars[0] + " = parallax_mapping_uv(%s, %s, CAMERA_DIRECTION_WORLD, INV_VIEW_MATRIX, UV);" % [height_map, amplitude];
return output_vars[0] + " = parallax_mapping_uv(%s, -%s, UV, TANGENT, NORMAL, BINORMAL, VIEW);" % [height_map, amplitude];