You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bevy now supports parallax mapping and depth maps. Parallax mapping puts normal
26
+
maps to shame when it comes to giving "illusion of depth" to a material. The top half of this video uses parallax mapping plus a normal map, whereas the bottom half only uses a normal map:
27
+
28
+
<videocontrolsloop><sourcealt="a rotating view of the earth, the top half of the screen uses parallax mapping, while the bottom half does not"src="earth-parallax.webm"type="video/webm"/></video>
29
+
<divstyle="font-size: 1.0rem"class="release-feature-authors">earth view, elevation & night view by NASA (public domain)</div>
30
+
31
+
Notice how it is not merely the shading of pixels that changes, but their
32
+
actual position on screen. The mountaintops hide mountain ridges behind
33
+
themselves. High mountains move faster than coastal areas.
34
+
35
+
Parallax mapping moves pixels according to the perspective and depth on the
36
+
surface of the geometry. Adding true 3D depth to flat surfaces.
37
+
38
+
All of that, without adding a single vertex to the geometry. The whole globe
39
+
has exactly 648 vertices. Unlike a more primitive shader, such as displacement
40
+
mapping, parallax mapping only requires an additional grayscale image, called
41
+
the `depth_map`.
42
+
43
+
Games often use parallax mapping for cobblestones or brick walls, so
44
+
let's make a brick wall in Bevy! First, we spawn a mesh:
0 commit comments