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

gpu_shader_diag_stripes_frag.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 74cf1c5a3dccb95afa001a1174d7889223e11926 (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

uniform vec4 color1;
uniform vec4 color2;
uniform int size1;
uniform int size2;

#if __VERSION__ == 120
  #define fragColor gl_FragColor
#else
  out vec4 fragColor;
#endif

void main()
{
	float phase = mod((gl_FragCoord.x + gl_FragCoord.y), (size1 + size2));

	if (phase < size1)
	{
		fragColor = color1;
	}
	else {
		fragColor = color2;
	}
}