remap.similar_1a.none.frag 451 B

123456789101112131415161718192021222324252627282930
  1. #version 450
  2. in float inf;
  3. in flat ivec4 ini4;
  4. out vec4 outf4;
  5. float Test1(int bound)
  6. {
  7. float r = 0;
  8. for (int x=0; x<bound; ++x)
  9. r += 0.5;
  10. return r;
  11. }
  12. float Test2(int bound)
  13. {
  14. if (bound > 2)
  15. return Test1(bound);
  16. else
  17. return float(bound * 2 +
  18. ini4.y * ini4.z +
  19. ini4.x);
  20. }
  21. void main()
  22. {
  23. outf4 = vec4(Test1(int(inf)) +
  24. Test2(int(inf)));
  25. }