-This is a GLSL fragment shader I originally made on [Shadertoy](https://www.shadertoy.com/view/Ds3XRl) when learning raymarching. Later I switched to analytic raycasting for better performance. It's made by raycasting simple spheres with a bunch of fbm noises used for the normals and colors, and a complete hack for the atmosphere.
+This is a GLSL fragment shader I originally made on [Shadertoy](https://www.shadertoy.com/view/Ds3XRl) when learning raymarching. Later I switched to analytic raycasting for better performance. It's made by raycasting simple spheres with a bunch of fbm noises used for the normals and colors, and a fake atmosphere computed with distance functions.
-I wanted to display it on a web page so that I can make a nice GUI to tweak some uniforms. Here it is !
+I wanted to display it on a web page so that I can make a nice GUI to tweak the uniforms. Here it is !
It runs at 60fps on my old low-end phone, so it should also be quite smooth on whatever device you have.
@@ -24,7 +24,7 @@ It runs at 60fps on my old low-end phone, so it should also be quite smooth on w
## Textures
-

+
@@ -34,17 +34,22 @@ It runs at 60fps on my old low-end phone, so it should also be quite smooth on w
-This one uses textures (colors, specular, bump) borrowed and adapted from NASA [Visible Earth](https://visibleearth.nasa.gov/collection/1484/blue-marble) collection in order to render a realistic view of our home planet. Still with a few controls, and no quality setting because it should already run at full fps on most devices.
+After the procedural version, I found a bunch of textures to display a realistic view of some planets of our solar system. Still with a few controls, and no quality setting because it should already run at full fps on most devices.
## Note
If you want a minimalist setup to render GLSL shaders on a canvas like this one, you can check out the [little study](https://github.com/jsulpis/webgl-libs-comparison) I made before this project.
-## More samples
+## More renders
-

-

-

-

+

+

+

+

+

+

+

+

+
diff --git a/screenshots/earth-1.jpg b/screenshots/earth-1.jpg
deleted file mode 100644
index 63fc736..0000000
Binary files a/screenshots/earth-1.jpg and /dev/null differ
diff --git a/screenshots/earth-ui.jpg b/screenshots/earth-ui.jpg
index 83573b3..dd1dcf2 100644
Binary files a/screenshots/earth-ui.jpg and b/screenshots/earth-ui.jpg differ
diff --git a/screenshots/earth.jpg b/screenshots/earth.jpg
new file mode 100644
index 0000000..a59f599
Binary files /dev/null and b/screenshots/earth.jpg differ
diff --git a/screenshots/jupiter.jpg b/screenshots/jupiter.jpg
new file mode 100644
index 0000000..91f756f
Binary files /dev/null and b/screenshots/jupiter.jpg differ
diff --git a/screenshots/mars.jpg b/screenshots/mars.jpg
new file mode 100644
index 0000000..cf465ab
Binary files /dev/null and b/screenshots/mars.jpg differ
diff --git a/screenshots/mercury.jpg b/screenshots/mercury.jpg
new file mode 100644
index 0000000..a8dc03c
Binary files /dev/null and b/screenshots/mercury.jpg differ
diff --git a/screenshots/moon.jpg b/screenshots/moon.jpg
new file mode 100644
index 0000000..7817298
Binary files /dev/null and b/screenshots/moon.jpg differ
diff --git a/screenshots/procedural-1.jpg b/screenshots/procedural-1.jpg
index 2bdf74b..d02903d 100644
Binary files a/screenshots/procedural-1.jpg and b/screenshots/procedural-1.jpg differ
diff --git a/screenshots/procedural-2.jpg b/screenshots/procedural-2.jpg
index a42dd45..0287a75 100644
Binary files a/screenshots/procedural-2.jpg and b/screenshots/procedural-2.jpg differ
diff --git a/screenshots/procedural-3.jpg b/screenshots/procedural-3.jpg
index b52d329..77bd181 100644
Binary files a/screenshots/procedural-3.jpg and b/screenshots/procedural-3.jpg differ
diff --git a/screenshots/procedural-ui.jpg b/screenshots/procedural-ui.jpg
index a9f723d..83ef9be 100644
Binary files a/screenshots/procedural-ui.jpg and b/screenshots/procedural-ui.jpg differ
diff --git a/screenshots/venus.jpg b/screenshots/venus.jpg
new file mode 100644
index 0000000..7b832a4
Binary files /dev/null and b/screenshots/venus.jpg differ
diff --git a/src/pages/mars.astro b/src/pages/mars.astro
index 9ab5e95..22b889d 100644
--- a/src/pages/mars.astro
+++ b/src/pages/mars.astro
@@ -28,7 +28,7 @@ import Layout from "../layouts/Layout.astro";
uniforms: {
...defaultUniforms,
uAtmosphereColor: [0.9, 0.15, 0],
- uAtmosphereDensity: 0.1,
+ uAtmosphereDensity: 0.2,
uQuality: Math.min(window.devicePixelRatio, 2),
uPlanetColor,
uStars,