summaryrefslogtreecommitdiff
path: root/generated_tests/templates/gen_conversion_fp64/shader-zero-sign.frag.mako
blob: f6c61df7d61f51c12c311c91dd9755565e2a908d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## coding=utf-8
<%inherit file="shader_base.mako"/>\
uniform ${from_type} from;
uniform ${to_type} to;

out vec4 color;

#define ONE 1.0
#define RED vec4(1.0, 0.0, 0.0, 1.0)
#define GREEN vec4(0.0, 1.0, 0.0, 1.0)

void main()
{
	${to_type} pre_converted = ${converted_from};
	${to_type} converted = ONE / pre_converted;
	bool match = converted == to;
	color = match ? GREEN : RED;
}