Merge pull request #281 from Calinou/3d-preview-increase-parallax-detail

Improve parallax mapping quality in the 3D preview
This commit is contained in:
Rodz Labs 2021-02-14 11:30:34 +01:00 committed by GitHub
commit 9179a287ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -251,6 +251,8 @@ func update_material(m, file_prefix = null) -> void:
if get_source(INPUT_DEPTH) != null and parameters.depth_scale > 0:
m.depth_enabled = true
m.depth_deep_parallax = true
# Increase level of detail for parallax occlusion mapping (the default is 32).
m.depth_max_layers = 64
m.depth_scale = parameters.depth_scale * 0.2
m.depth_texture = get_generated_texture("depth", file_prefix)
else: