Polygon offset in COLLADA


Can somebody please explain me how to specify polygon offset in COLLADA?

I am working on some utility to convert 3D models from various formats to COLLADA and I need to solve some ‘depth-buffer collisions’.



In COLLADA, <geometry> is agnostic to rendering. All the information about rendering and appearance is symbolically bound to the primitives material attribute. E.g:

  <triangles material="my_appearance" />

Since polygon offset is a rendering trick, my first approach would be to add the information into the material/effect.

It’s also possible to add the offset values as another <source> and <input> stream and assemble them as more per-vertex meta data. The material will still have to know what to do with the information.