Quote:Original post by Basiror
e.g.:
a grass shader with (normal grass, boring grass, animated grass)
lets say you work with an older graphics card and implement these shaders mentioned above
they all provide some properties used to render them
now you switched to a modern graphic card and you want to update the graphics quality you just release a new dll with a higher priority to provide the functionality used by the shaders, just in a modern manner maybe with enhanced features
the shader dll itself runs a test on you system to check if everything is available otherwise the system chooses the old dll
this allows you to specialize a generalized representation of a effect for certain graphic cards without rewriting and updating a ton of code
the shader dll itself just does the state processing
the effect properties are still seperated in a effects/shader file
People all over the world update their graphics, by releasing patches, which include executable and the art needed.
Making DLL system just for the ease of updaing the graphics is little pointless, because the typical executable size is nothing to download today, and provides a lot more freedom to implement visual features for modern cards (if we are talking about that) - no shader can ADD new features, nor modify quantities of older ones (say adding light shafts, fog layers, spider-webs over the walls, etc.).
IF you go that way, the executable patching is the way, DLL-patching is half-the-way, not-really-there.
A system with priorities looks dangerous. Tweaking parameters by hand, and overriding priorities looks dangerous.
We create shader, set a priority and hope it will be resolved.
Better is to explicitly put the new shader, in the effects we want with the priority we want - it is more stable.