Not logged inOpenClonk Forum
Up Topic Easier Shading Concept

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Zapper

>(I'm actually not sure whether it would complain currently if they were missing).


That's a big point. I think a lot of your "shorter" syntax comes from you assuming sensible defaults. If we had the same defaults in the current system, you could also leave out "receive_shadows on" or "ambient 1.0 1.0 1.0 1.0" or "tex_address_mode wrap / filtering trilinear". Also I don't see where in your example the fog of war is added to the object color. The slice system of the current shaders was done exactly for that reason: that you could easily add code that modifies the color in certain steps of the pipeline (before FoW/after FoW/before the lighting/...).
How would a shader in your example look like that just wants to change the edge highlighting a bit (slice "light"?) but leaves the color and the FoW at default? Could you do that? That's pretty important, because you mostly will want to leave a lot of the preprocessing and postprocessing at default to not make your object stand out too much. Similarly, how could I change the overlay shading (slice "texture") then leave everything intact and then in the end make the overlay shine through FoW?

I agree that the current situation is not the best. But it solves many of the problems we have (and your solution would apparently lose some features?).
Maybe a bunch of sensible defaults would already shrink the material definition enough. And a better exporter (as you say we need anyway) would be able to just export the stuff we can actually use. And..

> With the new system, it should not be necessary at all to read the shader sources the engine uses in order to write a new shader, only the documentation.


Why? You would still have to search through the generated shader code, because your example is obviously not all that happens (what about FoW? What about GFX_BLIT_Mod2? What about color modulation?)..

>So this project will also consist of writing a good documentation that explains everything.


I think this would also help a lot for the current stuff. Especially if e.g. the windmill project would tackle to visualize the shader code somehow.

I think you want to solve the right things. I just don't think what you propose would help alot :I

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill