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[vertex shader]
16#version 430
17
18layout(location = 0) in vec4 position;
19layout(location = 0) out vec4 frag_color;
20
21layout(set = 0, binding = 0) readonly buffer block1 {
22  vec4 in_color;
23};
24
25void main() {
26  gl_Position = position;
27  frag_color = in_color;
28}
29
30[fragment shader]
31#version 430
32
33layout(location = 0) in vec4 frag_color;
34layout(location = 0) out vec4 final_color;
35
36void main() {
37  final_color = frag_color;
38}
39
40[test]
41ssbo 0 subdata vec4 0 1.0 0.0 0.0 1.0
42draw rect -1 -1 1 1
43