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 have to admit I don't get the advantage of the changed syntax.
A clear disadvantage would be that it wouldn't work in ogre meshy anymore. And that we would have to write our own exporters for blender & co.

With the current syntax your example would look something along the lines of  this.. (minus some copy&paste mistakes). I don't really see where your changed syntax would have a clear advantage.

===== material =====
fragment_program hut_fragment glsl
{
    source hut_fragment.glsl
}

material WoodenCabin
{
  receive_shadows on
  technique
  {
    pass
    {
      specular 0.2 0.2 0.2 12.500000
      texture_unit
      {
        texture woodencabin.jpg
        tex_address_mode wrap
        filtering trilinear
      }
      fragment_program_ref normal_map_fragment
      {
        param_named basemap int 0
      }
    }
  }
}
===== shader =====
uniform sampler2D basemap;

slice(texture+1)
{
  fragColor = fragColor * texture(basemap, texcoord);
}


PS: including shaders, shading libraries and special shading effects would all be cool, of course. But that doesn't have to do anything with the syntax and could also be implemented in the current system.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill