What is a shader and is there a precise definition?I see some people use it interchangably with materials and even sometimes textures while others don't.This happens across the industry in all fields of 3d.What the fuck is going on?
>>678387normal people>a programmed function for shading(calculating light) things in a certain wayretards>a shiny ball wtih texture XDD
>>678387A shader is the thing that you plug your texture maps into and possesses the properties (often physically correct) of the material you want to represent in your 3D scene.For instance: metal, dielectric (plastic, wood, etc.), glass, skin, etc.It's the thing that defines the surface of a mesh once the renderer calculates how the lights hit it and whatnot.One thing is for sure, shader =/= texturesAMA if it's still not clear
>>678390Thank you for clearing this up.>>678391Wait, what you just described is a material.
>>678395shader (properties) + textures (visual info) = material
>>678390Well it's not always light. Even VLC filters are shaders. A shader is a program composed of a vertex program and/or a fragment program and/or a geometry program and/or a tessellation program. You basically control what happens between things using the GPU. It's could be moving vertices, could be how light is calculated, could be a implementation height maps, could be a screen filter, etc. You're essentially controlling how things are rendered on a screen. Vertex programs, for example, control how things work between vertices. The space between verts is interpolated. Easiest(but not the only, obviously) example is Gouraud shading(https://en.wikipedia.org/wiki/Gouraud_shading). Look at the specular. While fragment programs run a program for each fragment on the screen, which gives you phong or blinn-phong for example. Geometry program controls/creates geometry, Same for the Tessellation program. Again, you could make wind, weird moving blobs, or nightvision with shaders- they're not just for materials.For example, this- https://www.youtube.com/watch?v=qKN1_dxtxUE is all shader. Doesn't have any animations or whatever, everything's basically procedural.
>>678968shit link* https://en.wikipedia.org/wiki/Gouraud_shading