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

antialiasing_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: 9ded3b6c6c5f5b4b041fe384d71f809c4b5cc79e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

out vec2 uvs;

#if STEP == 1
out vec2 pixcoord;
#endif

#if STEP == 2
out vec4 offset;
#else
out vec4 offsets[3];
#endif

void main()
{
  int v = gl_VertexID % 3;
  float x = -1.0 + float((v & 1) << 2);
  float y = -1.0 + float((v & 2) << 1);
  gl_Position = vec4(x, y, 1.0, 1.0);
  uvs = (gl_Position.xy * 0.5 + 0.5).xy;

#if STEP == 0
  SMAAEdgeDetectionVS(uvs, offsets);
#elif STEP == 1
  SMAABlendingWeightCalculationVS(uvs, pixcoord, offsets);
#elif STEP == 2
  SMAANeighborhoodBlendingVS(uvs, offset);
#endif
}