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
Mh, I really don't get it. Your example with the current syntax would be something along the lines of


// the default shader is included by default... #include DefaultShader
//float4 getTexture()
slice (texture + 1)
{
  //float4 foo = _inherited();  //apperently, we just discard it?
  // ..float4 foo = fragColor; <- also not necessary, just added for clarity
  //return coolComicShadingEffect();
  fragColor = coolComicShadingEffect();
}


So you would still have to write about the same amount of lines of code. And you would also still have to remember the same amount of "special names" like "fragColor", because you would need to remember how to get the default color, the light map, the overlay color, the material properties, the color modulation, etc...
And whether it's "fragColor" vs "getDefaultColor" or "clrMod" vs "getColorModulation" or "oc_Color" vs "getTeamColor" does not truly make a difference...

And this way you can still access information from other parts of the shader (your "local variable" problem)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill