Shaders are extremely rendundant: the current terrain shaders only has a few differences with the default shader.
These shaders currently hardcode all characteristics of materials / lights as being values or textures. This is not handy, as I cannot not in advance whether my material will use a texture or a value for its diffuse component. the same applies to specular & ambient components. Further than that, it might not be efficient to make all the shaders aware of shadow-maps. But the cost & maintenance required to have a single shader for each purpose would be overwhelming.
A shader-graph would allow full customization of what a shader supports. Some shaders should be included for most common needs.
The description should be achieved in a programmer-friendly way: DSL? Class based on high-level API?
Shaders are extremely rendundant: the current terrain shaders only has a few differences with the default shader.
These shaders currently hardcode all characteristics of materials / lights as being values or textures. This is not handy, as I cannot not in advance whether my material will use a texture or a value for its diffuse component. the same applies to specular & ambient components. Further than that, it might not be efficient to make all the shaders aware of shadow-maps. But the cost & maintenance required to have a single shader for each purpose would be overwhelming.
A shader-graph would allow full customization of what a shader supports. Some shaders should be included for most common needs.
The description should be achieved in a programmer-friendly way: DSL? Class based on high-level API?