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

gpu_shader_fullscreen_blit_vert.glsl « kernels « metal « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5d5a0e2ab5f0317dd717fea8ac73ef022f3a8f30 (plain)
1
2
3
4
5
6
7
8
9
10

void main()
{
  /* The position represents a 0-1 square, we first scale it by the size we want to have it on
   * screen next we divide by the fullscreen size, this will bring everything in range [0,1]. Next
   * we scale to NDC range [-1,1]. */
  gl_Position = vec4((((pos * size + dst_offset) / fullscreen) * 2.0 - 1.0), 1.0, 1.0);
  vec2 uvoff = (src_offset / fullscreen);
  uvcoordsvar = vec4(pos + uvoff, 0.0, 0.0);
}