spv.130.frag 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #version 140
  2. #extension GL_ARB_texture_gather : enable
  3. vec3 a;
  4. float b;
  5. in vec4 i;
  6. out vec4 o;
  7. out ivec3 io;
  8. out uvec4 uo;
  9. flat in float fflat;
  10. smooth in float fsmooth;
  11. noperspective in float fnop;
  12. uniform samplerCube sampC;
  13. #extension GL_ARB_texture_rectangle : enable
  14. uniform sampler2D samp2D;
  15. uniform sampler2DShadow samp2DS;
  16. uniform sampler2DRect samp2DR;
  17. uniform sampler2DArray samp2DA;
  18. void bar3()
  19. {
  20. o += textureGatherOffset(samp2D, vec2(0.3), ivec2(1));
  21. o += textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
  22. }
  23. #extension GL_ARB_gpu_shader5 : enable
  24. void bar4()
  25. {
  26. o += textureGatherOffset(samp2DR, vec2(0.3), ivec2(1));
  27. o += textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1));
  28. o += textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2);
  29. }
  30. #extension GL_ARB_texture_cube_map_array : enable
  31. uniform samplerCubeArray Sca;
  32. uniform isamplerCubeArray Isca;
  33. uniform usamplerCubeArray Usca;
  34. uniform samplerCubeArrayShadow Scas;
  35. void bar5()
  36. {
  37. io = textureSize(Sca, 3);
  38. o += texture(Sca, i);
  39. io += texture(Isca, i, 0.7).xyz;
  40. uo = texture(Usca, i);
  41. o += textureLod(Sca, i, 1.7);
  42. a = textureSize(Scas, 3);
  43. float f = texture(Scas, i, i.y);
  44. ivec4 c = textureGrad(Isca, i, vec3(0.1), vec3(0.2));
  45. o += vec4(a, f + c);
  46. }
  47. #extension GL_ARB_shading_language_420pack : enable
  48. const int ai[3] = { 10, 23, 32 };
  49. uniform layout(binding=0) sampler2D bounds;
  50. void bar6()
  51. {
  52. mat4x3 m43;
  53. float a1 = m43[3].y;
  54. //int a2 = m43.length(); // ERROR until shading_language_420pack is fully implemented
  55. const float b = 2 * a1;
  56. //a.x = gl_MinProgramTexelOffset + gl_MaxProgramTexelOffset; // ERROR until shading_language_420pack is fully implemented
  57. }
  58. #extension GL_ARB_texture_rectangle : enable
  59. #extension GL_ARB_shader_texture_lod : require
  60. uniform sampler2D s2D;
  61. uniform sampler2DRect s2DR;
  62. uniform sampler2DRectShadow s2DRS;
  63. uniform sampler1D s1D;
  64. uniform sampler2DShadow s2DS;
  65. void main()
  66. {
  67. o = textureGather(sampC, vec3(0.2));
  68. o.y = gl_ClipDistance[3];
  69. bar3();
  70. bar4();
  71. bar5();
  72. bar6();
  73. }