Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the appearance of simple parallax in StandardMaterial3D #50383

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jul 11, 2021

master version of #51433. Follow-up to #50377.

This uses offset limiting to avoid distortion in the distance, and makes simple (non-deep) parallax more usable overall. While this reduces the overall impression of depth, it results in much less texture warping in motion.

Inspired by the Three.js parallax mapping demo: https://github.com/mrdoob/three.js/blob/bb484d616955e2bf1c3329383c3c0cc3543ccf71/examples/jsm/shaders/ParallaxShader.js#L62-L64

Testing project: https://github.com/Calinou/godot-parallax-test-4.0

Preview

Before After
old_simple_parallax_1 new_simple_parallax_1
old_simple_parallax_2 new_simple_parallax_2
old_simple_parallax_3 new_simple_parallax_3
old_simple_parallax_4 new_simple_parallax_4
old_simple_parallax_5 new_simple_parallax_5
old_simple_parallax_6 new_simple_parallax_6

@Calinou Calinou added this to the 4.0 milestone Jul 11, 2021
@Calinou Calinou added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jul 11, 2021
@Calinou Calinou force-pushed the standardmaterial3d-improve-simple-parallax branch from b37853f to b118ed7 Compare July 11, 2021 23:00
@akien-mga akien-mga requested a review from a team July 13, 2021 06:32
This uses offset limiting to avoid distortion in the distance,
and makes simple (non-deep) parallax more usable overall.
@Calinou Calinou force-pushed the standardmaterial3d-improve-simple-parallax branch from b118ed7 to e47d0e0 Compare August 9, 2021 13:11
@Calinou Calinou removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Aug 9, 2021
@reduz reduz merged commit 5e585ea into godotengine:master Sep 9, 2021
@Calinou Calinou deleted the standardmaterial3d-improve-simple-parallax branch September 9, 2021 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants