1# Copyright 2018 The Amber Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15[require]
16fbsize 800 600
17
18[vertex shader]
19#version 430
20
21layout(location = 0) in vec4 position;
22layout(location = 0) out vec4 frag_color;
23
24layout(set = 0, binding = 0) readonly buffer block1 {
25  vec4 in_color;
26};
27
28void main() {
29  gl_Position = position;
30  frag_color = in_color;
31}
32
33[fragment shader]
34#version 430
35
36layout(location = 0) in vec4 frag_color;
37layout(location = 0) out vec4 final_color;
38
39void main() {
40  final_color = frag_color;
41}
42
43[test]
44clear
45
46ssbo 0 subdata vec4 0 1.0 0.0 0.0 1.0
47draw rect -1 -1 1 1
48
49ssbo 0 subdata vec4 0 0.0 1.0 0.0 1.0
50draw rect -1  0 1 1
51
52ssbo 0 subdata vec4 0 0.0 0.0 1.0 1.0
53draw rect  0 -1 1 1
54
55ssbo 0 subdata vec4 0 0.5 0.0 0.5 1.0
56draw rect  0  0 1 1
57
58relative probe rect rgba (0.0, 0.0, 0.5, 0.5) (1.0,   0,   0, 1.0)
59relative probe rect rgba (0.0, 0.5, 0.5, 0.5) (  0, 1.0,   0, 1.0)
60relative probe rect rgba (0.5, 0.0, 0.5, 0.5) (  0,   0, 1.0, 1.0)
61relative probe rect rgba (0.5, 0.5, 0.5, 0.5) (0.5,   0, 0.5, 1.0)
62