mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-24 19:59:40 +00:00
50a8cabbbb
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21918 e7fa87d3-cd2b-0410-9028-fcbf551c1848
34 lines
944 B
GLSL
34 lines
944 B
GLSL
#version 430
|
|
|
|
const int a = 1;
|
|
const int b = 2;
|
|
const int c = a + b; // 3
|
|
const int d = c - a; // 2
|
|
const float e = float(d); // 2.0
|
|
const float f = e * float(c); // 6.0
|
|
const float g = f / float(d); // 3.0
|
|
|
|
const vec2 pytho = vec2(3.0, 4.0);
|
|
|
|
in vec4 inv;
|
|
out vec4 FragColor;
|
|
out vec2 out2;
|
|
|
|
void main()
|
|
{
|
|
vec4 dx = dFdx(inv);
|
|
const ivec4 v = ivec4(a, b, c, d);
|
|
vec4 array2[v.y]; // 2
|
|
const ivec4 u = ~v;
|
|
|
|
const float h = degrees(g); // 171.88
|
|
|
|
FragColor = vec4(e, f, g, h); // 2, 6, 3, 171.88
|
|
|
|
vec4 array3[c]; // 3
|
|
vec4 arrayMax[int(max(float(array2.length()), float(array3.length())))];
|
|
vec4 arrayMin[int(min(float(array2.length()), float(array3.length())))];
|
|
FragColor = vec4(arrayMax.length(), arrayMin.length(), sin(3.14), cos(3.14)); // 3, 2, .00159, -.999
|
|
out2 = length(pytho) + normalize(pytho) + dFdx(pytho) + dFdy(pytho) + fwidth(pytho); // 5+3/5, 5+4/5
|
|
}
|