diff --git a/README.md b/README.md index 701de79..081bb19 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ -# Realtime procedural planet shader in WebGL +# Realtime planet shader in WebGL -screenshot of the shader +## Procedural -
-
- - - - [live demo](https://jsulpis.github.io/realtime-planet-shader/) +
+ screenshot of the procedural shader - +
+ live demo +
+

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. @@ -21,13 +20,29 @@ It runs at 60fps on my old low-end phone, so it should also be quite smooth on w
-> [!NOTE] -> If you want some guidance 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. +## Textures + +
+ screenshot of the earth shader + +
+ live demo +
+ +
+
+ +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. + +## 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 samples -screenshot with different settings -screenshot with different settings -screenshot with different settings +screenshot with different settings +screenshot with different settings +screenshot with different settings +screenshot with different settings diff --git a/screenshots/earth-1.jpg b/screenshots/earth-1.jpg new file mode 100644 index 0000000..63fc736 Binary files /dev/null and b/screenshots/earth-1.jpg differ diff --git a/screenshots/earth-ui.jpg b/screenshots/earth-ui.jpg new file mode 100644 index 0000000..83573b3 Binary files /dev/null and b/screenshots/earth-ui.jpg differ diff --git a/screenshots/procedural-1.jpg b/screenshots/procedural-1.jpg new file mode 100644 index 0000000..2bdf74b Binary files /dev/null and b/screenshots/procedural-1.jpg differ diff --git a/screenshots/procedural-2.jpg b/screenshots/procedural-2.jpg new file mode 100644 index 0000000..a42dd45 Binary files /dev/null and b/screenshots/procedural-2.jpg differ diff --git a/screenshots/procedural-3.jpg b/screenshots/procedural-3.jpg new file mode 100644 index 0000000..b52d329 Binary files /dev/null and b/screenshots/procedural-3.jpg differ diff --git a/screenshots/procedural-ui.jpg b/screenshots/procedural-ui.jpg new file mode 100644 index 0000000..a9f723d Binary files /dev/null and b/screenshots/procedural-ui.jpg differ