├── LICENSE ├── README.md ├── distancefield1.html ├── distancefield2.html ├── distancefield3.html ├── distancefield4.html ├── distancefield5.html ├── distancefield6.html ├── distancefield7.html ├── distancefield8.html ├── distancefield9.html ├── fractal.html ├── ggreynoise512.png ├── knot.html ├── knot2.html ├── mandelbox.html ├── mandelbulb.html ├── mandelbulb2.html ├── mandelcube.html ├── mengersponge.html ├── mengersponge2.html ├── newtonheightfield.html ├── noise512.png ├── polyhedra.html ├── polyhedra2.html ├── polyhedra3.html ├── reflective1.html ├── sand2.png ├── spheres.html ├── terrain1.html ├── terrain2.html ├── terrain3.html ├── waves2.html ├── waves3.html ├── waves5.html └── waves6.html /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Kevin Roast 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | WebGL Shader demos - GPU rendering shader experiments with procedural 3D scene generation using ray marching and distance field (also known as 'sphere tracing') rendering techniques. 2 | 3 | by Kevin Roast - see http://www.kevs3d.co.uk/dev/shaders/ for live demos and screenshots. 4 | 5 | - Lots of code/ideas for these come from reading: 6 | 7 | http://www.iquilezles.org/www/material/nvscene2008/rwwtt.pdf 8 | 9 | http://www.pouet.net/topic.php?which=7931&page=1 10 | 11 | http://www.pouet.net/topic.php?which=7920&page=1 12 | 13 | http://iquilezles.org/www/articles/distfunctions/distfunctions.htm 14 | 15 | https://www.shadertoy.com/ 16 | 17 | If you want to understand this stuff read through the PDF and pouet.net links above 18 | -------------------------------------------------------------------------------- /distancefield1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 16 | 17 | 25 | 209 | 210 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | Toggle Full Screen 330 | Show me more awesome demos! 331 | 332 | 333 | -------------------------------------------------------------------------------- /distancefield3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 19 | 27 | 235 | 236 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | Toggle Full Screen 452 | Show me more awesome demos! 453 | 454 | -------------------------------------------------------------------------------- /distancefield4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 26 | 211 | 212 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | Toggle Full Screen 429 | Show me more awesome demos! 430 | 431 | -------------------------------------------------------------------------------- /distancefield5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 26 | 280 | 281 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | Toggle Full Screen 513 | Show me more awesome demos! 514 | 515 | -------------------------------------------------------------------------------- /fractal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 26 | 238 | 239 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | Toggle Full Screen 456 | Show me more awesome demos! 457 | 458 | -------------------------------------------------------------------------------- /ggreynoise512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinroast/webglshaders/9f1eb4d9d2ab6a5f6961e268bffe0bc561b407c1/ggreynoise512.png -------------------------------------------------------------------------------- /knot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 26 | 243 | 244 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | Toggle Full Screen 501 | Show me more awesome demos! 502 | 503 | -------------------------------------------------------------------------------- /mandelbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 26 | 256 | 257 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | Toggle Full Screen 485 | Show me more awesome demos! 486 | 487 | -------------------------------------------------------------------------------- /mandelbulb2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 25 | 241 | 242 | 450 | 451 | 452 |