// These shaders are work-arounds in case geometry shaders
// are not supported, so vertices can't be created on the graphics card.
// Multiple vertices are passed in for each primitive,
// and each one is offset according to its texture coords.

//includes:
vertex_program rviz/glsl120/nogp/pass_depth.vert glsl { source pass_depth.vert }

vertex_program rviz/glsl120/nogp/billboard_tile.vert glsl
{
  source billboard_tile.vert
  default_params
  {
    param_named_auto worldviewproj_matrix worldviewproj_matrix
    param_named_auto size custom          0
    param_named_auto normal custom 3
    param_named_auto up custom 4
  }
}
vertex_program rviz/glsl120/nogp/billboard_tile.vert(with_depth) glsl
{
  source billboard_tile.vert
  preprocessor_defines WITH_DEPTH=1
  attach rviz/glsl120/nogp/pass_depth.vert
  default_params
  {
    param_named_auto worldviewproj_matrix worldviewproj_matrix
    param_named_auto worldview_matrix     worldview_matrix
    param_named_auto size custom          0
    param_named_auto normal custom 3
    param_named_auto up custom 4
  }
}


vertex_program rviz/glsl120/nogp/billboard.vert glsl
{
  source billboard.vert
  default_params {
    param_named_auto worldviewproj_matrix worldviewproj_matrix
    param_named_auto camera_pos           camera_position_object_space
    param_named_auto size custom          0
    param_named_auto auto_size custom     6
  }
}
vertex_program rviz/glsl120/nogp/billboard.vert(with_depth) glsl
{
  source billboard.vert
  preprocessor_defines WITH_DEPTH=1
  attach rviz/glsl120/nogp/pass_depth.vert
  default_params {
    param_named_auto worldviewproj_matrix worldviewproj_matrix
    param_named_auto worldview_matrix     worldview_matrix
    param_named_auto camera_pos           camera_position_object_space
    param_named_auto size custom          0
    param_named_auto auto_size custom     6
  }
}


vertex_program rviz/glsl120/nogp/box.vert glsl
{
  source box.vert
  default_params {
    param_named_auto worldviewproj_matrix worldviewproj_matrix
    param_named_auto size custom          0
    param_named_auto auto_size custom     6
  }
}
vertex_program rviz/glsl120/nogp/box.vert(with_depth) glsl
{
  source box.vert
  preprocessor_defines WITH_DEPTH=1
  attach rviz/glsl120/nogp/pass_depth.vert
  default_params {
    param_named_auto worldviewproj_matrix worldviewproj_matrix
    param_named_auto worldview_matrix     worldview_matrix
    param_named_auto size custom          0
    param_named_auto auto_size custom     6
  }
}


fragment_program rviz/glsl120/nogp/box.frag glsl
{
  source box.frag
  default_params
  {
    param_named_auto highlight custom 5
    param_named_auto alpha custom 1
  }
}
