Welcome to mirror list, hosted at ThFree Co, Russian Federation.

clipbound_vert.glsl « shaders « overlay « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c065a66414f13f6fce7d5f392e8fe2b8715bc949 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

#pragma BLENDER_REQUIRE(common_view_lib.glsl)

void main()
{
  vec3 world_pos = boundbox[gl_VertexID];
  gl_Position = point_world_to_ndc(world_pos);

  /* Result in a position at 1.0 (far plane). Small epsilon to avoid precision issue.
   * This mimics the effect of infinite projection matrix
   * (see http://www.terathon.com/gdc07_lengyel.pdf). */
  gl_Position.z = gl_Position.w - 2.4e-7;
}