Feature request: per-tileset overrides for global shaders
LaputianBird
Member Posts: 107
While testing in EE some tileset I started developing in 1.69, I stumbled on an issue that is caused by a combination of global shaders and tileset mesh/texture characteristics.
To illustrate it,
1.74 screenshot, all shaders disabled:
1.74 screenshot, using a tuned-down AO shader courtesy of @Soren (the effect is still too strong and creates artifacts though):
1.74 screenshot, with the high contrast shader enabled on top of the AO shader (artifacts are less visible, but just because contrast flattens all dark areas to pitch black):
The AO artifacts can be considered a feature, and the geometry adjusted to a degree, to generate more artifacts and smoother/more curved. But it still enforces restrictions on the volume of the meshes, and the HC shader tends to trash all dark textures regardless.
So I'm proposing a few changes on the way global shaders are handled, which should be easy to implement (according to @Sherincall ) and which would not only fix the issue, but also extend the range of options for tileset artists.
Right now, global shaders are toggled on/off by UI settings, and can be overridden globally by dropping the edited files in the override/haks, but both options lack granularity. While retaining this mechanism, I'm proposing a cascading system, that has at the top level the ability to specify alternative shaders to override the global ones - it would be implemented either/both by extending the .are and .git file formats to store the area-specific overrides, and/or by using the (incoming?) NWScript shader API, which would allow us to modify it dynamically (which incidentally would allow for global "area effects" on the fly according to any parameter).
Just under the area overrides, there'd be the tileset level, in which the author could specify such global shader overrides (the same way as we can specify a different 3d grass texture) in order to avoid the issue I've illustrated above, but also as a new tool to globally affect the overall looks of the tileset.
At the bottom of the cascading system, the user would still be able to disable all global shaders for performance reasons - sacrificing some of the artistic effects and features.
So, to summarize: can we have support for global shaders overrides in the .set file format, and in the .are or .git file formats?
To illustrate it,
1.74 screenshot, all shaders disabled:
1.74 screenshot, using a tuned-down AO shader courtesy of @Soren (the effect is still too strong and creates artifacts though):
1.74 screenshot, with the high contrast shader enabled on top of the AO shader (artifacts are less visible, but just because contrast flattens all dark areas to pitch black):
The AO artifacts can be considered a feature, and the geometry adjusted to a degree, to generate more artifacts and smoother/more curved. But it still enforces restrictions on the volume of the meshes, and the HC shader tends to trash all dark textures regardless.
So I'm proposing a few changes on the way global shaders are handled, which should be easy to implement (according to @Sherincall ) and which would not only fix the issue, but also extend the range of options for tileset artists.
Right now, global shaders are toggled on/off by UI settings, and can be overridden globally by dropping the edited files in the override/haks, but both options lack granularity. While retaining this mechanism, I'm proposing a cascading system, that has at the top level the ability to specify alternative shaders to override the global ones - it would be implemented either/both by extending the .are and .git file formats to store the area-specific overrides, and/or by using the (incoming?) NWScript shader API, which would allow us to modify it dynamically (which incidentally would allow for global "area effects" on the fly according to any parameter).
Just under the area overrides, there'd be the tileset level, in which the author could specify such global shader overrides (the same way as we can specify a different 3d grass texture) in order to avoid the issue I've illustrated above, but also as a new tool to globally affect the overall looks of the tileset.
At the bottom of the cascading system, the user would still be able to disable all global shaders for performance reasons - sacrificing some of the artistic effects and features.
So, to summarize: can we have support for global shaders overrides in the .set file format, and in the .are or .git file formats?
Post edited by LaputianBird on
7
Comments
And also indirectly related to https://trello.com/c/ZXE8CSow/60-improve-shader-communication
Extending the GFF to store the custom shader info shouldn't be a problem. Same with the .set. It could also be added to the environment presets.
However this proves even more that we need to be able to override the global shaders on a per-tileset basis, specifying alternate shaders to replace the stock ones - not only to prevent trashing certain areas and tilesets depending on whether the player has the shaders enabled or not, or even depending on whether the client is using custom global shaders or not, but also in order to add a new tool to the author's toolbox, giving them the ability to enhance their areas beyond the current options.
To further clarify: I'm fully aware that we'll be able to use per-mesh and/or per-texture shaders, that will allow us to do some pretty neat things design-wise. But the point is that the simple toggling of shader like AO or High Contrast would make any such effort moot - unless we are allowed to override them on the tileset level
Example of the result that can be achieved through the use of specific shaders (no changes to geometry or textures since the initial report - and using a torch):
TR
I was joking!
I was told there was happy fun times here, and lo and behold, I found a very good suggestion. Showing my support!
*unapologetic necromancer*