File: video-f.sdr

package info (click to toggle)
freespace2 24.0.2%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: trixie
  • size: 43,188 kB
  • sloc: cpp: 583,107; ansic: 21,729; python: 1,174; sh: 464; makefile: 248; xml: 181
file content (21 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
in vec4 fragTexCoord;
out vec4 fragOut0;
uniform sampler2DArray ytex;
uniform sampler2DArray utex;
uniform sampler2DArray vtex;
layout (std140) uniform movieData {
	float alpha;
	float pad[3];
};

void main()
{
	float y = texture(ytex, vec3(fragTexCoord.st, 0.0)).r;
	float u = texture(utex, vec3(fragTexCoord.st, 0.0)).r;
	float v = texture(vtex, vec3(fragTexCoord.st, 0.0)).r;
	vec3 val = vec3(y - 0.0625, u - 0.5, v - 0.5);
	fragOut0.r = dot(val, vec3(1.1640625, 0.0, 1.59765625));
	fragOut0.g = dot(val, vec3(1.1640625, -0.390625, -0.8125));
	fragOut0.b = dot(val, vec3(1.1640625, 2.015625, 0.0));
	fragOut0.a = alpha;
}