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

antialiasing_frag.glsl « shaders « overlay « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aa7ef63e49b03bb61990f45b5cc5fe866934f890 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

in vec2 uvs;

#if STEP == 0

uniform sampler2D colorTex;

in vec4 offsets[3];

out vec4 fragColor;

void main()
{
  fragColor = SMAALumaEdgeDetectionPS(uvs, offsets, colorTex).xyxy;
}

#elif STEP == 1

uniform sampler2D edgesTex;
uniform sampler2D areaTex;
uniform sampler2D searchTex;

in vec2 pixcoord;
in vec4 offsets[3];

out vec4 fragColor;

void main()
{
  fragColor = SMAABlendingWeightCalculationPS(
      uvs, pixcoord, offsets, edgesTex, areaTex, searchTex, vec4(0));
}

#elif STEP == 2

uniform sampler2D colorTex;
uniform sampler2D blendTex;

in vec4 offset;

out vec4 fragColor;

void main()
{
  fragColor = SMAANeighborhoodBlendingPS(uvs, offset, colorTex, blendTex);
}

#endif