6 ms·
Anyone have recommendations for resources for learning to write shaders?
by nefarious_ends 1y ago
Anyone have recommendations for resources for learning to write shaders?
- FjordWarden 1y agoI've always enjoyed watching The Art of Code[1], Freya[2] also has a good number of videos on it. But that is just vertex shaders for things like Shadertoys. There is much more to computer graphics or GPGPU than this though, Im still learning about that myself X). [1] https://www.youtube.com/watch?v=eKtsY7hYTPg https://www.youtube.com/watch?v=eKtsY7hYTPg [2]https://www.youtube.com/watch?v=kfM-yu0iQBk https://www.youtube.com/watch?v=kfM-yu0iQBk
- jms55 1y agoIf you want to make nice looking materials and effects, you need a combination of good lighting (comes from the rendering engine, not the material), and artistic capabilities/talent. Art is a lot harder to teach than programming I feel, or at least I don't know how to teach it. Programming the shaders themselves are pretty simple imo, they're just pure functions that return color data or triangle positions. The syntax might be a little different than you're used to depending on the shader language, but it should be easy enough to pick up in a day. If you want to write compute shaders for computation, then it gets a lot more tricky and you need to spend some time learning about memory accesses, the underlying hardware, and profiling.
- pornel 1y agohttps://www.scratchapixel.com https://www.scratchapixel.com https://www.youtube.com/c/acerola_t https://www.youtube.com/c/acerola_t https://www.shadertoy.com https://www.shadertoy.com https://google.github.io/tour-of-wgsl/ https://google.github.io/tour-of-wgsl/
- alook 1y agoThe book of shaders is fantastic: http://www.thebookofshaders.com/ http://www.thebookofshaders.com/
- setr 1y agoFYI apparently the www.* link doesn't actually have the menu for some reason? It's just the world graphic and a blank menu bar. You need to visit http://thebookofshaders.com/ http://thebookofshaders.com/
- arjonagelhout 1y agoMy experience with writing shaders (such as for physically based rendering) is that the shading languages (MSL, GLSL, HLSL) are easy to switch between. The hard part is understanding the physics and understanding how GPUs work internally. My main approach to writing shaders is to look at existing programs (e.g. Blender) and see what techniques are in use. The Google Filament renderer documentation [0] is also really good when it comes to BDSF functions. Some papers from Unreal Engine might also help, such as "Real Shading in Unreal Engine 4" [1] [0] https://google.github.io/filament/Filament.md.html https://google.github.io/filament/Filament.md.html [1] https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf https://cdn2.unrealengine.com/Resources/files/2013SiggraphPr...