Clone of mesa.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

varfor1f.glsl 453B

12345678910111213141516171819202122
  1. const int KernelSize = 16;
  2. uniform float KernelValue1f[KernelSize];
  3. void main(void)
  4. {
  5. int i;
  6. vec4 sum = vec4(0.0);
  7. vec4 tmp = gl_Color;
  8. gl_Position = gl_Vertex;
  9. for (i = 0; i < KernelSize; ++i) {
  10. float x, y, z, w;
  11. x = KernelValue1f[i]; ++i;
  12. y = KernelValue1f[i]; ++i;
  13. z = KernelValue1f[i]; ++i;
  14. w = KernelValue1f[i];
  15. sum += tmp * vec4(x, y, z, w);
  16. }
  17. gl_FrontColor = sum;
  18. }