How to generate a parallax skybox?

Hey, I want to make a parallax skybox, here is the example:
from origin image:


and depth map:

to generate a skybox background in parallax which like:


the example from depthflow

Maybe I must rewrite glsl, but I’d like to known any example relatived in there.js.
Please.

A highly-subdivided PlaneGeometry + .displacementMap should do what you’re looking for.

And if you’d like a bit more optimal solution, without tons of subdivided vertices, you can indeed dive into GLSL and create some simple parallax mapping on a 1x1 PlaneGeometry.

3 Likes

How’s this? You can see index.js for the shader code, I only really hacked this together but the principle is there, would be great to see it refined further!

6 Likes

wow, that’s so cool~ this just is what I want. Thanks very very much!

1 Like