Techniques and Passes
Structuring an msl shader in more detailed sections would shift alot more data into automatic handling of shaders and reduce user interaction:
For example:
config brain_storming_new_features
{
// choose at run time which technique to use or let
// the rendering decide.
technique forward_rendering
{
// phases gibe the option of structuring the rendering
// because without, how could you render multiple passes
// without user interaction.
phase depth
{
// passes would be nice because those put
// shader together by usage. A depth pass
// could even be automatically generated.
pass depth
{
vertex_shader
{
}
pixel_shader
{
}
}
// or without a pass statement, if only one pass is used.
vertex_shader
{
}
pixel_shader
{
}
}
phase color
{
pass basic_coloring
{
}
pass texturing
{
}
}
phase lighting
{
pass first_pass
{
}
pass maybe_another_pass
{
}
}
}
technique deferred
{
// same as above.
}
}
- do we have arbitrary passes or fixed passes?
- or mix those. aditional arbitrary and fixed.
- if mixed, we need phases,
Quality of Output
Another thing is the quality level of the rendering. You do not need the full blown high quality rendering all the time. in fact, working on a scene often requires just some basic coloring maybe with textures and no lighting. So how could that be done?
- Maybe with multiple levels of quality. Maybe three?
- I think, it must be placed on techiques, becaues you do not want to specify the same technique again.
config brain_storming_new_features
{
technique forward : q0
{
// so just some basic coloring
}
technique forward : q1
{
// do some lighting per vertex
}
technique forward : q2
{
// do more lighting per vertex
}
technique forward : q3
{
// full blown per pixel lighting
}
technique defered
{
}
}
Techniques and Passes
Structuring an msl shader in more detailed sections would shift alot more data into automatic handling of shaders and reduce user interaction:
For example:
Quality of Output
Another thing is the quality level of the rendering. You do not need the full blown high quality rendering all the time. in fact, working on a scene often requires just some basic coloring maybe with textures and no lighting. So how could that be done?