submap.materialΒΆ

ogre_media/materials/scripts/submap.material defines the OGRE material cartographer_ros/Submap, the source material that every OgreSlice clones at construction time.

material cartographer_ros/Submap
{
  technique
  {
    pass
    {
      vertex_program_ref cartographer_ros/glsl120/submap.vert {}

      fragment_program_ref cartographer_ros/glsl120/submap.frag
      {
        param_named u_submap int 0
        param_named u_alpha float 1.0
      }
    }
  }
}

The material has a single technique with a single pass that binds:

  • The vertex program cartographer_ros/glsl120/submap.vert (declared in glsl120.program).

  • The fragment program cartographer_ros/glsl120/submap.frag, with the default parameters u_submap = 0 (texture unit 0) and u_alpha = 1.0.

OgreSlice clones this material per slice (naming it SubmapMaterial-<trajectory>-<submap>-<slice>) and then overrides u_alpha at render time via SetAlpha(). The texture bound to unit 0 is uploaded by OgreSlice::Update() from the submap texture pixels returned by the SubmapQuery service.