This commit is contained in:
2026-05-06 23:44:13 +02:00
parent a5f787d80f
commit fd7038b853
1574 changed files with 365439 additions and 0 deletions
@@ -0,0 +1,102 @@
#!amber
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SHADER vertex vertShaderTex GLSL
#version 430
layout(location = 0) in vec4 position;
layout(location = 1) in vec2 texCoordsIn;
layout(location = 0) out vec2 texCoordsOut;
void main() {
gl_Position = position;
texCoordsOut = texCoordsIn;
}
END
SHADER fragment fragShaderTex GLSL
#version 430
layout(location = 0) in vec2 texCoordsIn;
layout(location = 0) out vec4 colorOut;
layout(set=0, binding=0) uniform sampler2D referenceSampler;
layout(set=0, binding=1) uniform samplerBuffer bufferSampler;
void main() {
vec4 referenceValue = texture(referenceSampler, texCoordsIn);
vec4 bufferValue = texelFetch(bufferSampler, int((gl_FragCoord.y-0.5) * 8 + (gl_FragCoord.x-0.5)));
if (bufferValue == referenceValue)
colorOut = vec4(0., 1., 0., 1.);
else
colorOut = vec4(1., 0., 0., 1.);
}
END
IMAGE texture FORMAT B8G8R8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0
255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0
255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0
0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0
0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0
0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0
0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255
0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255
END
IMAGE texture2 FORMAT B8G8R8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0
255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0
255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0
0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0
0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0
0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0
0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255
0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255 0 0 255
END
BUFFER framebuffer FORMAT B8G8R8A8_UNORM
SAMPLER sampler
BUFFER position DATA_TYPE vec2<float> DATA
-1. -1.
1. -1.
-1. 1.
1. -1.
1. 1.
-1. 1.
END
BUFFER texcoords DATA_TYPE vec2<float> DATA
0.0 0.0
1.0 0.0
0.0 1.0
1.0 0.0
1.0 1.0
0.0 1.0
END
PIPELINE graphics pipeline
ATTACH vertShaderTex
ATTACH fragShaderTex
BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
BIND BUFFER texture2 AS uniform_texel_buffer DESCRIPTOR_SET 0 BINDING 1
VERTEX_DATA position LOCATION 0
VERTEX_DATA texcoords LOCATION 1
FRAMEBUFFER_SIZE 8 8
BIND BUFFER framebuffer AS color LOCATION 0
END
CLEAR_COLOR pipeline 0 0 0 0
CLEAR pipeline
RUN pipeline DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
EXPECT framebuffer IDX 0 0 SIZE 8 8 EQ_RGBA 0 255 0 255
@@ -0,0 +1,110 @@
#!amber
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SHADER vertex vertShaderTex GLSL
#version 430
layout(location = 0) in vec4 position;
layout(location = 1) in vec2 texCoordsIn;
layout(location = 0) out vec2 texCoordsOut;
void main() {
gl_Position = position;
texCoordsOut = texCoordsIn;
}
END
SHADER fragment fragShaderTex GLSL
#version 430
layout(location = 0) in vec2 texCoordsIn;
layout(location = 0) out vec4 colorOut;
layout(set=0, binding=0) uniform sampler2D referenceSampler;
layout(set=0, binding=1) uniform samplerBuffer bufferSampler;
void main() {
vec4 referenceValue = texture(referenceSampler, texCoordsIn);
vec4 bufferValue = texelFetch(bufferSampler, int((gl_FragCoord.y-0.5) * 8 + (gl_FragCoord.x-0.5)));
if (bufferValue == referenceValue)
colorOut = vec4(0., 1., 0., 1.);
else
colorOut = vec4(1., 0., 0., 1.);
}
END
IMAGE texture FORMAT B8G8R8A8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
255 100 0 255 255 80 0 255 255 33 19 255 255 44 70 255 255 9 8 253 155 0 0 212
255 0 0 255 255 60 60 255 255 40 17 205 255 45 120 255 255 2 8 153 250 0 0 115
255 0 0 255 255 80 23 255 255 50 12 215 255 46 11 255 255 34 78 255 221 0 0 222
255 0 0 255 255 80 44 255 255 80 90 155 255 13 12 255 255 32 56 255
80 255 20 255 40 255 36 251 0 255 110 175 0 225 0 55 0 151 0 51 0 225 0 235
20 215 32 255 30 255 34 215 20 255 32 255 220 255 0 25 0 215 0 25 0 208 0 205
90 255 34 255 30 255 0 215 80 255 44 255 110 255 0 152 0 225 0 21 0 203 0 215
130 215 35 255 11 255 33 251 90 255 55 255 110
50 255 255 160 11 105 214 0 10 134 158 190 0 255 255 0 0 255 255 0 90 255 255 0
55 151 205 170 10 103 254 20 0 123 238 35 10 215 250 10 22 255 235 33 80 255 255 0
66 115 205 120 11 212 244 44 53 250 250 0 20 255 255 0 23 255 253 0 43 255 255 0
68 255 255 0 0 222 233
END
IMAGE texture2 FORMAT B8G8R8A8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
255 100 0 255 255 80 0 255 255 33 19 255 255 44 70 255 255 9 8 253 155 0 0 212
255 0 0 255 255 60 60 255 255 40 17 205 255 45 120 255 255 2 8 153 250 0 0 115
255 0 0 255 255 80 23 255 255 50 12 215 255 46 11 255 255 34 78 255 221 0 0 222
255 0 0 255 255 80 44 255 255 80 90 155 255 13 12 255 255 32 56 255
80 255 20 255 40 255 36 251 0 255 110 175 0 225 0 55 0 151 0 51 0 225 0 235
20 215 32 255 30 255 34 215 20 255 32 255 220 255 0 25 0 215 0 25 0 208 0 205
90 255 34 255 30 255 0 215 80 255 44 255 110 255 0 152 0 225 0 21 0 203 0 215
130 215 35 255 11 255 33 251 90 255 55 255 110
50 255 255 160 11 105 214 0 10 134 158 190 0 255 255 0 0 255 255 0 90 255 255 0
55 151 205 170 10 103 254 20 0 123 238 35 10 215 250 10 22 255 235 33 80 255 255 0
66 115 205 120 11 212 244 44 53 250 250 0 20 255 255 0 23 255 253 0 43 255 255 0
68 255 255 0 0 222 233
END
BUFFER framebuffer FORMAT B8G8R8A8_UNORM
SAMPLER sampler
BUFFER position DATA_TYPE vec2<float> DATA
-1. -1.
1. -1.
-1. 1.
1. -1.
1. 1.
-1. 1.
END
BUFFER texcoords DATA_TYPE vec2<float> DATA
0.0 0.0
1.0 0.0
0.0 1.0
1.0 0.0
1.0 1.0
0.0 1.0
END
PIPELINE graphics pipeline
ATTACH vertShaderTex
ATTACH fragShaderTex
BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
BIND BUFFER texture2 AS uniform_texel_buffer DESCRIPTOR_SET 0 BINDING 1
VERTEX_DATA position LOCATION 0
VERTEX_DATA texcoords LOCATION 1
FRAMEBUFFER_SIZE 8 8
BIND BUFFER framebuffer AS color LOCATION 0
END
CLEAR_COLOR pipeline 0 0 0 0
CLEAR pipeline
RUN pipeline DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
EXPECT framebuffer IDX 0 0 SIZE 8 8 EQ_RGBA 0 255 0 255
@@ -0,0 +1,102 @@
#!amber
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SHADER vertex vertShaderTex GLSL
#version 430
layout(location = 0) in vec4 position;
layout(location = 1) in vec2 texCoordsIn;
layout(location = 0) out vec2 texCoordsOut;
void main() {
gl_Position = position;
texCoordsOut = texCoordsIn;
}
END
SHADER fragment fragShaderTex GLSL
#version 430
layout(location = 0) in vec2 texCoordsIn;
layout(location = 0) out vec4 colorOut;
layout(set=0, binding=0) uniform sampler2D referenceSampler;
layout(set=0, binding=1) uniform samplerBuffer bufferSampler;
void main() {
vec4 referenceValue = texture(referenceSampler, texCoordsIn);
vec4 bufferValue = texelFetch(bufferSampler, int((gl_FragCoord.y-0.5) * 8 + (gl_FragCoord.x-0.5)));
if (bufferValue.r == referenceValue.r)
colorOut = vec4(0., 1., 0., 1.);
else
colorOut = vec4(1., 0., 0., 1.);
}
END
IMAGE texture FORMAT R8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
185 120 185 20 185 120 189 120
145 122 185 10 185 12 188 122
135 222 15 12 185 121 186 113
175 124 5 130 185 100 185 123
177 221 6 140 185 101 182 29
188 121 67 150 185 120 184 127
189 27 88 22 185 120 15 123
111 18 185 24 185 120 17 220
END
IMAGE texture2 FORMAT R8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
185 120 185 20 185 120 189 120
145 122 185 10 185 12 188 122
135 222 15 12 185 121 186 113
175 124 5 130 185 100 185 123
177 221 6 140 185 101 182 29
188 121 67 150 185 120 184 127
189 27 88 22 185 120 15 123
111 18 185 24 185 120 17 220
END
BUFFER framebuffer FORMAT B8G8R8A8_UNORM
SAMPLER sampler
BUFFER position DATA_TYPE vec2<float> DATA
-1. -1.
1. -1.
-1. 1.
1. -1.
1. 1.
-1. 1.
END
BUFFER texcoords DATA_TYPE vec2<float> DATA
0.0 0.0
1.0 0.0
0.0 1.0
1.0 0.0
1.0 1.0
0.0 1.0
END
PIPELINE graphics pipeline
ATTACH vertShaderTex
ATTACH fragShaderTex
BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
BIND BUFFER texture2 AS uniform_texel_buffer DESCRIPTOR_SET 0 BINDING 1
VERTEX_DATA position LOCATION 0
VERTEX_DATA texcoords LOCATION 1
FRAMEBUFFER_SIZE 8 8
BIND BUFFER framebuffer AS color LOCATION 0
END
CLEAR_COLOR pipeline 0 0 0 0
CLEAR pipeline
RUN pipeline DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
EXPECT framebuffer IDX 0 0 SIZE 8 8 EQ_RGBA 0 255 0 255
@@ -0,0 +1,102 @@
#!amber
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SHADER vertex vertShaderTex GLSL
#version 430
layout(location = 0) in vec4 position;
layout(location = 1) in vec2 texCoordsIn;
layout(location = 0) out vec2 texCoordsOut;
void main() {
gl_Position = position;
texCoordsOut = texCoordsIn;
}
END
SHADER fragment fragShaderTex GLSL
#version 430
layout(location = 0) in vec2 texCoordsIn;
layout(location = 0) out vec4 colorOut;
layout(set=0, binding=0) uniform sampler2D referenceSampler;
layout(set=0, binding=1) uniform samplerBuffer bufferSampler;
void main() {
vec4 referenceValue = texture(referenceSampler, texCoordsIn);
vec4 bufferValue = texelFetch(bufferSampler, int((gl_FragCoord.y-0.5) * 8 + (gl_FragCoord.x-0.5)));
if (bufferValue == referenceValue)
colorOut = vec4(0., 1., 0., 1.);
else
colorOut = vec4(1., 0., 0., 1.);
}
END
IMAGE texture FORMAT R8G8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
152 10 255 20 254 3 255 7 255 55 255 255 251 255 255
272 81 205 22 244 20 255 20 255 155 112 255 111 215 190 255 0
126 44 201 23 133 229 255 10 255 207 255 255 125 255 255
56 120 101 48 177 2 255 10 255 207 0 255 132 33 0 255 0
45 130 189 89 77 88 255 120 255 201 255 211 233 255 255
135 134 202 42 88 76 255 9 255 41 0 255 36 244 0 255 0
185 34 133 199 87 176 255 12 255 244 255 255 2 255 255
142 88 177 99 150 190 255 16 17 25 39 39 11 151 23 255 0
END
IMAGE texture2 FORMAT R8G8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
152 10 255 20 254 3 255 7 255 55 255 255 251 255 255
272 81 205 22 244 20 255 20 255 155 112 255 111 215 190 255 0
126 44 201 23 133 229 255 10 255 207 255 255 125 255 255
56 120 101 48 177 2 255 10 255 207 0 255 132 33 0 255 0
45 130 189 89 77 88 255 120 255 201 255 211 233 255 255
135 134 202 42 88 76 255 9 255 41 0 255 36 244 0 255 0
185 34 133 199 87 176 255 12 255 244 255 255 2 255 255
142 88 177 99 150 190 255 16 17 25 39 39 11 151 23 255 0
END
BUFFER framebuffer FORMAT B8G8R8A8_UNORM
SAMPLER sampler
BUFFER position DATA_TYPE vec2<float> DATA
-1. -1.
1. -1.
-1. 1.
1. -1.
1. 1.
-1. 1.
END
BUFFER texcoords DATA_TYPE vec2<float> DATA
0.0 0.0
1.0 0.0
0.0 1.0
1.0 0.0
1.0 1.0
0.0 1.0
END
PIPELINE graphics pipeline
ATTACH vertShaderTex
ATTACH fragShaderTex
BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
BIND BUFFER texture2 AS uniform_texel_buffer DESCRIPTOR_SET 0 BINDING 1
VERTEX_DATA position LOCATION 0
VERTEX_DATA texcoords LOCATION 1
FRAMEBUFFER_SIZE 8 8
BIND BUFFER framebuffer AS color LOCATION 0
END
CLEAR_COLOR pipeline 0 0 0 0
CLEAR pipeline
RUN pipeline DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
EXPECT framebuffer IDX 0 0 SIZE 8 8 EQ_RGBA 0 255 0 255
@@ -0,0 +1,104 @@
#!amber
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SHADER vertex vertShaderTex GLSL
#version 430
layout(location = 0) in vec4 position;
layout(location = 1) in vec2 texCoordsIn;
layout(location = 0) out vec2 texCoordsOut;
void main() {
gl_Position = position;
texCoordsOut = texCoordsIn;
}
END
SHADER fragment fragShaderTex GLSL
#version 430
layout(location = 0) in vec2 texCoordsIn;
layout(location = 0) out vec4 colorOut;
layout(set=0, binding=0) uniform sampler2D referenceSampler;
layout(set=0, binding=1) uniform samplerBuffer bufferSampler;
void main() {
vec4 referenceValue = texture(referenceSampler, texCoordsIn);
vec4 bufferValue = texelFetch(bufferSampler, int((gl_FragCoord.y-0.5) * 8 + (gl_FragCoord.x-0.5)));
if (bufferValue == referenceValue)
colorOut = vec4(0., 1., 0., 1.);
else
colorOut = vec4(1., 0., 0., 1.);
}
END
IMAGE texture FORMAT R8G8B8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
125 87 23 255 0 0 155 0 0 255 110 110 212 11 0 255 11 10 115 12 11 255 0 0
215 8 21 255 0 0 55 0 0 255 180 230 220 22 13 215 12 231 215 44 23 255 0 0
152 35 0 255 0 0 155 0 0 255 88 20 255 12 23 121 122 123 241 4 10
2 255 1 0 255 0 0 255 0 0 255 77 0 255 0 0 255 0 0 255 0 0 255 0
230 255 66 0 255 0 0 255 0 0 255 54 74 255 0 0 255 0 0 255 0 0 255 0
33 255 0 0 255 0 0 155 0 0 255 76 75 255 0
23 120 233 0 0 255 0 0 155 43 34 212 111 120 255 0 10 252 22 123 215 33 30 223
44 220 35 22 24 255 0 0 215 120 33 211 122 120 255 130 12 251 22 23 221 210 211 215
55 0 244 0 87 85 82 0 251 220 32 205
END
IMAGE texture2 FORMAT R8G8B8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
125 87 23 255 0 0 155 0 0 255 110 110 212 11 0 255 11 10 115 12 11 255 0 0
215 8 21 255 0 0 55 0 0 255 180 230 220 22 13 215 12 231 215 44 23 255 0 0
152 35 0 255 0 0 155 0 0 255 88 20 255 12 23 121 122 123 241 4 10
2 255 1 0 255 0 0 255 0 0 255 77 0 255 0 0 255 0 0 255 0 0 255 0
230 255 66 0 255 0 0 255 0 0 255 54 74 255 0 0 255 0 0 255 0 0 255 0
33 255 0 0 255 0 0 155 0 0 255 76 75 255 0
23 120 233 0 0 255 0 0 155 43 34 212 111 120 255 0 10 252 22 123 215 33 30 223
44 220 35 22 24 255 0 0 215 120 33 211 122 120 255 130 12 251 22 23 221 210 211 215
55 0 244 0 87 85 82 0 251 220 32 205
END
BUFFER framebuffer FORMAT B8G8R8A8_UNORM
SAMPLER sampler
BUFFER position DATA_TYPE vec2<float> DATA
-1. -1.
1. -1.
-1. 1.
1. -1.
1. 1.
-1. 1.
END
BUFFER texcoords DATA_TYPE vec2<float> DATA
0.0 0.0
1.0 0.0
0.0 1.0
1.0 0.0
1.0 1.0
0.0 1.0
END
PIPELINE graphics pipeline
ATTACH vertShaderTex
ATTACH fragShaderTex
BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
BIND BUFFER texture2 AS uniform_texel_buffer DESCRIPTOR_SET 0 BINDING 1
VERTEX_DATA position LOCATION 0
VERTEX_DATA texcoords LOCATION 1
FRAMEBUFFER_SIZE 8 8
BIND BUFFER framebuffer AS color LOCATION 0
END
CLEAR_COLOR pipeline 0 0 0 0
CLEAR pipeline
RUN pipeline DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
EXPECT framebuffer IDX 0 0 SIZE 8 8 EQ_RGBA 0 255 0 255
@@ -0,0 +1,110 @@
#!amber
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SHADER vertex vertShaderTex GLSL
#version 430
layout(location = 0) in vec4 position;
layout(location = 1) in vec2 texCoordsIn;
layout(location = 0) out vec2 texCoordsOut;
void main() {
gl_Position = position;
texCoordsOut = texCoordsIn;
}
END
SHADER fragment fragShaderTex GLSL
#version 430
layout(location = 0) in vec2 texCoordsIn;
layout(location = 0) out vec4 colorOut;
layout(set=0, binding=0) uniform sampler2D referenceSampler;
layout(set=0, binding=1) uniform samplerBuffer bufferSampler;
void main() {
vec4 referenceValue = texture(referenceSampler, texCoordsIn);
vec4 bufferValue = texelFetch(bufferSampler, int((gl_FragCoord.y-0.5) * 8 + (gl_FragCoord.x-0.5)));
if (bufferValue == referenceValue)
colorOut = vec4(0., 1., 0., 1.);
else
colorOut = vec4(1., 0., 0., 1.);
}
END
IMAGE texture FORMAT R8G8B8A8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
255 100 0 255 255 80 0 255 255 33 19 255 255 44 70 255 255 9 8 253 155 0 0 212
255 0 0 255 255 60 60 255 255 40 17 205 255 45 120 255 255 2 8 153 250 0 0 115
255 0 0 255 255 80 23 255 255 50 12 215 255 46 11 255 255 34 78 255 221 0 0 222
255 0 0 255 255 80 44 255 255 80 90 155 255 13 12 255 255 32 56 255
80 255 20 255 40 255 36 251 0 255 110 175 0 225 0 55 0 151 0 51 0 225 0 235
20 215 32 255 30 255 34 215 20 255 32 255 220 255 0 25 0 215 0 25 0 208 0 205
90 255 34 255 30 255 0 215 80 255 44 255 110 255 0 152 0 225 0 21 0 203 0 215
130 215 35 255 11 255 33 251 90 255 55 255 110
50 255 255 160 11 105 214 0 10 134 158 190 0 255 255 0 0 255 255 0 90 255 255 0
55 151 205 170 10 103 254 20 0 123 238 35 10 215 250 10 22 255 235 33 80 255 255 0
66 115 205 120 11 212 244 44 53 250 250 0 20 255 255 0 23 255 253 0 43 255 255 0
68 255 255 0 0 222 233
END
IMAGE texture2 FORMAT R8G8B8A8_SRGB DIM_2D WIDTH 8 HEIGHT 8 DATA
255 100 0 255 255 80 0 255 255 33 19 255 255 44 70 255 255 9 8 253 155 0 0 212
255 0 0 255 255 60 60 255 255 40 17 205 255 45 120 255 255 2 8 153 250 0 0 115
255 0 0 255 255 80 23 255 255 50 12 215 255 46 11 255 255 34 78 255 221 0 0 222
255 0 0 255 255 80 44 255 255 80 90 155 255 13 12 255 255 32 56 255
80 255 20 255 40 255 36 251 0 255 110 175 0 225 0 55 0 151 0 51 0 225 0 235
20 215 32 255 30 255 34 215 20 255 32 255 220 255 0 25 0 215 0 25 0 208 0 205
90 255 34 255 30 255 0 215 80 255 44 255 110 255 0 152 0 225 0 21 0 203 0 215
130 215 35 255 11 255 33 251 90 255 55 255 110
50 255 255 160 11 105 214 0 10 134 158 190 0 255 255 0 0 255 255 0 90 255 255 0
55 151 205 170 10 103 254 20 0 123 238 35 10 215 250 10 22 255 235 33 80 255 255 0
66 115 205 120 11 212 244 44 53 250 250 0 20 255 255 0 23 255 253 0 43 255 255 0
68 255 255 0 0 222 233
END
BUFFER framebuffer FORMAT B8G8R8A8_UNORM
SAMPLER sampler
BUFFER position DATA_TYPE vec2<float> DATA
-1. -1.
1. -1.
-1. 1.
1. -1.
1. 1.
-1. 1.
END
BUFFER texcoords DATA_TYPE vec2<float> DATA
0.0 0.0
1.0 0.0
0.0 1.0
1.0 0.0
1.0 1.0
0.0 1.0
END
PIPELINE graphics pipeline
ATTACH vertShaderTex
ATTACH fragShaderTex
BIND BUFFER texture AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
BIND BUFFER texture2 AS uniform_texel_buffer DESCRIPTOR_SET 0 BINDING 1
VERTEX_DATA position LOCATION 0
VERTEX_DATA texcoords LOCATION 1
FRAMEBUFFER_SIZE 8 8
BIND BUFFER framebuffer AS color LOCATION 0
END
CLEAR_COLOR pipeline 0 0 0 0
CLEAR pipeline
RUN pipeline DRAW_ARRAY AS TRIANGLE_LIST START_IDX 0 COUNT 6
EXPECT framebuffer IDX 0 0 SIZE 8 8 EQ_RGBA 0 255 0 255