1 # Normally, uniform array variables are initialized by array literals.
3 # However, samplers are different. Consider a declaration such as:
5 # layout(binding = 5) uniform sampler2D[3];
7 # The initializer value is a single integer (5), while the storage has 3
8 # array elements. The proper behavior is to increment one for each
9 # element; they should be initialized to 5, 6, and 7.
14 GL_ARB_arrays_of_arrays
15 GL_ARB_shading_language_420pack
17 [vertex shader passthrough]
21 #extension GL_ARB_shading_language_420pack : enable
22 #extension GL_ARB_gpu_shader5: require
23 #extension GL_ARB_arrays_of_arrays: enable
25 layout(binding = 0) uniform sampler2D tex[2][2];
34 color = texture(tex[n][m], vec2(0.75, 0.25));
38 clear color 0.2 0.2 0.2 0.2
41 texture checkerboard 0 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0)
42 texparameter 2D min nearest
43 texparameter 2D mag nearest
45 texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0)
46 texparameter 2D min nearest
47 texparameter 2D mag nearest
49 texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0)
50 texparameter 2D min nearest
51 texparameter 2D mag nearest
53 texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0)
54 texparameter 2D min nearest
55 texparameter 2D mag nearest
61 relative probe rect rgb (0.0, 0.0, 0.5, 0.5) (1.0, 0.0, 0.0)
67 relative probe rect rgb (0.5, 0.0, 0.5, 0.5) (0.0, 1.0, 0.0)
73 relative probe rect rgb (0.0, 0.5, 0.5, 0.5) (0.0, 0.0, 1.0)
79 relative probe rect rgb (0.5, 0.5, 0.5, 0.5) (1.0, 1.0, 1.0)