5 ms·
What are shaders?
- jonas21 3y agoI like shaders as much as the next guy, but this page is almost content-free. If you're looking to learn more about shaders and like interactive demos, I'd recommend: https://thebookofshaders.com/ https://thebookofshaders.com/
- krick 3y agoI see very intriguing list of contents, but the links lead only up to "Fractional brownian motion". So, basically, 3 incomplete chapters out of 6. And there's a "Subscribe for the news letter" button. The website is dated 2015. So, what's up with the project? Is it essentially abandoned or what? There appear to be 2 month old commits in the repository though. Or is it just being written at an extremely slow rate? I don't get it. Edit: yeah, it appears to be abandoned. https://github.com/patriciogonzalezvivo/thebookofshaders/issues/221#issuecomment-668754080 https://github.com/patriciogonzalezvivo/thebookofshaders/iss...
- Uehreka 3y agoIt will likely never be finished, but the stuff that is there is solid gold, and is how I first learned shaders years ago.
- raincole 3y agoI'm seriously thinking of writing a shader book myself. I'd like to write it in WGSL tho... and I'm not sure if it deters potential readers simply because it's not HLSL.
- dang 3y agoSome discussions: The Book of Shaders (2015) - https://news.ycombinator.com/item?id=32117536 https://news.ycombinator.com/item?id=32117536 - July 2022 (22 comments) The Book of Shaders - https://news.ycombinator.com/item?id=23497924 https://news.ycombinator.com/item?id=23497924 - June 2020 (26 comments) The Book of Shaders: Noise (2015) - https://news.ycombinator.com/item?id=18868811 https://news.ycombinator.com/item?id=18868811 - Jan 2019 (1 comment) The Book of Shaders - https://news.ycombinator.com/item?id=15599935 https://news.ycombinator.com/item?id=15599935 - Nov 2017 (37 comments) The Book of Shaders - https://news.ycombinator.com/item?id=11457322 https://news.ycombinator.com/item?id=11457322 - April 2016 (15 comments) The Book of Shaders - https://news.ycombinator.com/item?id=9215582 https://news.ycombinator.com/item?id=9215582 - March 2015 (40 comments)
- BenoitP 3y agoAlso, for learning by example this website is gold: https://www.shadertoy.com/ https://www.shadertoy.com/
- paleotrope 3y agoI've read parts of both linked articles, but so far the one question I have hasn't been answered. Why are they called shaders?
- jahewson 3y agoOriginally they were for lighting, where each pixel of a triangle is shaded based on its illumination. When other kinds of graphics processing functions were added (eg manipulating geometry) they kept the name.
- mtklein 3y agoI have always assumed it's that originally their purpose was to provide the shade of each pixel.
- deleted 3y ago[deleted]
- jjtheblunt 3y agohttps://en.m.wikipedia.org/wiki/Shader#Vertex_shaders https://en.m.wikipedia.org/wiki/Shader#Vertex_shaders Tldr originally programmatic functions loaded in the pixel shading hardware pipeline
- delta_p_delta_x 3y agoBefore you could do fancy things with them like generative AI, run physics simulations, or mine cryptocurrencies, or even real-time ray-tracing, graphics cards were meant for, well, rasterised graphics. Even before the programmable pipeline of today, graphics pipelines were fixed-function: see OpenGL before v2.0, or DirectX before v9. And there were (are) algorithms to colour fragments after/before rasterisation, called shading algorithms, like Phong shading, Blinn-Phong shading, Gouraud shading, etc. So, the name stuck, even though now a shader can do a lot more than just set `gl_FragColor = vec4(1, 0, 0, 0)`.
- monocasa 3y agoAnd even before that point, shaders would be programs you would run as user programmable components of non-realtime software renderers. IIRC it was Pixar who used the term shader first in Renderman back in the 80s.