Using shaders to solve real-world problems
Shaders are a crucial part of 3D rendering. In Unity3D, lights, projectors, normals, tangents, and textures are all just data that will be passed to the shader. Once it has this data, the shader takes care of what is sent to the camera.
These examples illustrate the power of understanding the usage of a shader:
- If a shader simply maps a texture to geometry without using the scene lighting, it will return geometry that has brightness identical to that of the texture file. This means that as the lighting changes in a scene, say, to a dark night or a bright day, the geometry would look the same.
- If geometry has information about its normals, but the shader does not cull faces or use bump-mapping, then the normal ...