bgfx/3rdparty/glsl-optimizer/tests/fragment/glsl120-basic-in.txt

23 lines
483 B
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
#version 120
uniform float inInit = 13.0; // accept uniform initializers
uniform mat4x3 nonSqMat; // non square matrices
void main()
{
const float cosPI = cos(3.1415); // built-in calls in constant initializers
vec4 v;
v.x = 1.2f; // accepts 'f' suffix
v.y = 5; // automatic int-to-float
v.z = inInit;
v.w = cosPI;
v.x += nonSqMat[0][0];
float arr[4] = float[](1,2,3,4); // array initializer
v.y += arr[0];
v.z += arr.length(); // array length
gl_FragColor = v;
}