bauble.studio
3d-game-shaders-for-beginners
bauble.studio | 3d-game-shaders-for-beginners | |
---|---|---|
7 | 12 | |
341 | 17,117 | |
- | - | |
5.1 | 0.0 | |
5 months ago | 11 months ago | |
Janet | C++ | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bauble.studio
-
Domain Repetition
If you aren't familiar with SDFs, some rough intuition for what's going on here: you have some primitive functions that define shapes, you have combinators that distort shapes, and you then have combinators that distort space. And then when you trace rays through distorted space, you render an image that looks like your combinators distorted the shapes themselves, but really you're distorting the path that your rays travel along.
The operation here is that you distort space with the modulo operator. So now you have space that repeats -- and when you trace rays through this repeated space, you're basically teleporting the rays back to the origin (using mod in the classic "wrapping around" fashion) every time they pass out of a section of space.
And then ultimately the ray will collide with the shape -- the one shape -- that exists in this distorted space, after wrapping around some number of times.
If the idea of "taking the mod of space" is intriguing, I would encourage you to try playing with SDFs! It's a really incredible technique for real-time rendering of "3D vector graphics."
Also shameless plug for my SDF playground https://bauble.studio, and an example program that uses instanced repetition to render an "infinite" number of varying shapes:
(tile [400 0 300] (fn [i]
-
Why Janet?
Depending on what you're doing, Janet might be a great fit! I wrote a DSL for [expressing and shading 3D shapes](https://bauble.studio), and it was pretty easy. Depending on exactly what you're trying to do, the ease of embedding the Janet interpreter inside of other programs might be a big point in its favor.
- Signed distance functions in 46 lines of Python
-
Is there a name for this? -- Intermediate Representation with Graphics Primitives
For other inspiration check out Pyret in DCIC and the term Constructive Solid Geometry like Bauble
- Bauble: an interactive tutorial that will teach you everything you need to know to make art with lisp and math
- Bauble: A playground for making art with Lisp and math
3d-game-shaders-for-beginners
-
The Book of Shaders
This is a great series if you’re looking for a tutorial. https://lettier.github.io/3d-game-shaders-for-beginners/inde...
- Random Code Inspiration Volume 2
- 3D game shaders for beginners: step-by-step guide to SSAO, lighting, and more
- Beginner friendly tutorial
-
Ask HN: What is your new year's resolution?
Sort of.
1. I want to start with working through applying shaders to a 3d scene using the Panda3d library (https://github.com/panda3d/panda3d) . This repo covers that: https://github.com/lettier/3d-game-shaders-for-beginners.
2. Create a simple, custom, graphics-only (no collisions / physics) game engine using Entt (https://github.com/skypjack/entt) and Panda3d. The engine would rely mostly on simple inputs, like mouse clicks, and 3d graphics.
3. Configure clangd to warn on features outside C++11 then refactor both projects (1 & 2)
4. Run experiments on the game engine while working through the Vulkan book: https://raw.githubusercontent.com/Overv/VulkanTutorial/maste...
-
Where to find shader resources?
Book of Shaders 3D Game Shaders for Beginners Martin Donald Freya Holmer
-
Game Engine From Scratch
Some tutorials I have looked at (well nor originally, as I learned the basics when we were still at DX9 :D): - https://lettier.github.io/3d-game-shaders-for-beginners/index.html
- Are there any resources on Post processing effects like Bloom HDR rendering tone mapping etc..
-
OpenGL engine - testing omnidirectional shadow maps with Sponza
Thanks! What feature would you add next? I've been thinking of implementing some of the shaders here
- 3D Game Shaders for Beginners
What are some alternatives?
sdf-viewer - A fast and cross-platform Signed Distance Function (SDF) viewer, easily integrated with your SDF library.
godot-psx-style-demo - Demo project featuring a collection of PS1 style shaders and materials for Godot engine.
toodle.studio - turtle graphics playground
tinyrenderer - A brief computer graphics / rendering course
janetroids - This was a paint program and then became asteroids
julia-set-with-shaders - Julia set render with GLSL shaders and P5.js library
sdf - Simple SDF mesh generation in Python
SHADERed - Lightweight, cross-platform & full-featured shader IDE
glyph.janet - Personal Data Manager for the command line
Granite - My personal Vulkan renderer
conjure - Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)
LearnOpenGL - Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com