jsulpis/realtime-planet-shader

Realtime planet shader in WebGL

GLSL

407

61 commits

updated Nov 27, 2023

See the code

See what people are saying

SourceMessageScoreDate

Realtime Planet Shader: Interactive 3D planet animation

277

Nov 21, 2023

README

Realtime planet shader in WebGL

Procedural


This is a GLSL fragment shader I originally made on Shadertoy 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 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.


Textures


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 I made before this project.

More renders

a render of the Earth a render of the Moon a render of Mercury a render of Venus a render of Mars a render of Jupiter a render of the procedural planet a render of the procedural planet a render of the procedural planet
glsl
shader
webgl

jsulpis/realtime-planet-shader

Realtime planet shader in WebGL

GLSL

407

61 commits

updated Nov 27, 2023

See the code

See what people are saying

SourceMessageScoreDate

Realtime Planet Shader: Interactive 3D planet animation

277

Nov 21, 2023

README

Realtime planet shader in WebGL

Procedural


This is a GLSL fragment shader I originally made on Shadertoy 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 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.


Textures


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 I made before this project.

More renders

a render of the Earth a render of the Moon a render of Mercury a render of Venus a render of Mars a render of Jupiter a render of the procedural planet a render of the procedural planet a render of the procedural planet
glsl
shader
webgl

Significant stargazers

Nico Weber

308 followers · starred Nov 2023

Joe Pea

728 followers · starred Sep 2023

Richard Jones

565 followers · starred Sep 2023

Yann Bertrand

218 followers · starred Nov 2023