summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-mat-mul-1.shader_test
blob: d1f148017dea46fe3d2c49b2b81971855d19180f (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
[require]
GLSL >= 1.10

[vertex shader]
void main()
{
	gl_Position = gl_Vertex;
}

[fragment shader]
uniform vec4 color;

void main()
{
	mat3 m = mat3(0.1, 0.8, 0.1,
		      0.3, 0.3, 0.5,
		      0.9, 0.0, 0.1);
	vec3 n = m * color.xyz;
	gl_FragColor = vec4(n * 0.5 + 0.5, 1.0);
}

[test]
uniform vec4 color 1.0 0.0 0.0 0.0
draw rect -1 -1 2 2
probe all rgba 0.55 0.90 0.55 1.0