skia2/tests/sksl/intrinsics/UintBitsToFloat.glsl
John Stiles 469fb3c619 Rename variables named input in test files.
`input` is a reserved word in GLSL. http://screen/85m4iRwvJRadKbV

Change-Id: Iffc0a47d916a2419a27767902c839e09bfa7fe26
Bug: skia:11115
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/454736
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-09-30 16:39:21 +00:00

12 lines
515 B
GLSL

out vec4 sk_FragColor;
uniform float testInput;
uniform mat2 testMatrix2x2;
uniform vec4 colorGreen;
uniform vec4 colorRed;
vec4 main() {
vec4 inputVal = vec4(testMatrix2x2) * vec4(1.0, 1.0, -1.0, -1.0);
uvec4 expectedB = uvec4(1065353216u, 1073741824u, 3225419776u, 3229614080u);
return ((inputVal.x == uintBitsToFloat(expectedB.x) && inputVal.xy == uintBitsToFloat(expectedB.xy)) && inputVal.xyz == uintBitsToFloat(expectedB.xyz)) && inputVal == uintBitsToFloat(expectedB) ? colorGreen : colorRed;
}