5 #define CircleVertex450 (VK_SHADER_STAGE_VERTEX_BIT | (1 << 6))
6 #define CircleFragment450 (VK_SHADER_STAGE_FRAGMENT_BIT | (1 << 7))
10 { VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
11 { { 0, { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_VERTEX_BIT,
nullptr } } },
17 { VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
30 "#extension GL_ARB_separate_shader_objects : enable\n"
31 "layout(set = 0, binding = 0) uniform Projection { mat4 projection; } proj;\n"
32 "layout(push_constant) uniform ComboBuffer {\n"
38 "layout(location = 0) out vec4 circleColor;\n"
39 "layout(location = 1) out vec4 circleParams;\n"
41 " vec2 vertices[4] = { vec2(cb.positions[0], cb.positions[1]),\n"
42 " vec2(cb.positions[0], cb.positions[3]),\n"
43 " vec2(cb.positions[2], cb.positions[1]),\n"
44 " vec2(cb.positions[2], cb.positions[3]) };\n"
45 " gl_Position = proj.projection * cb.transform * vec4(vertices[gl_VertexIndex], 0.0, 1.0);\n"
46 " circleColor = cb.color;\n"
47 " circleParams = cb.params;\n"
48 " circleParams.x = (cb.positions[0] + cb.positions[2]) / 2.0;\n"
49 " circleParams.y = (cb.positions[1] + cb.positions[3]) / 2.0;\n"
52 0x07230203, 0x00010300, 0x00080008, 0x00000064, 0x00000000, 0x00020011,
53 0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
54 0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0009000F, 0x00000000,
55 0x00000004, 0x6E69616D, 0x00000000, 0x00000031, 0x0000003E, 0x0000004B,
56 0x00000050, 0x00030003, 0x00000002, 0x000001C2, 0x00090004, 0x415F4C47,
57 0x735F4252, 0x72617065, 0x5F657461, 0x64616873, 0x6F5F7265, 0x63656A62,
58 0x00007374, 0x00040005, 0x00000004, 0x6E69616D, 0x00000000, 0x00050005,
59 0x0000000C, 0x74726576, 0x73656369, 0x00000000, 0x00050005, 0x0000000F,
60 0x626D6F43, 0x6675426F, 0x00726566, 0x00060006, 0x0000000F, 0x00000000,
61 0x6E617274, 0x726F6673, 0x0000006D, 0x00060006, 0x0000000F, 0x00000001,
62 0x69736F70, 0x6E6F6974, 0x00000073, 0x00050006, 0x0000000F, 0x00000002,
63 0x61726170, 0x0000736D, 0x00050006, 0x0000000F, 0x00000003, 0x6F6C6F63,
64 0x00000072, 0x00030005, 0x00000011, 0x00006263, 0x00060005, 0x0000002F,
65 0x505F6C67, 0x65567265, 0x78657472, 0x00000000, 0x00060006, 0x0000002F,
66 0x00000000, 0x505F6C67, 0x7469736F, 0x006E6F69, 0x00070006, 0x0000002F,
67 0x00000001, 0x505F6C67, 0x746E696F, 0x657A6953, 0x00000000, 0x00070006,
68 0x0000002F, 0x00000002, 0x435F6C67, 0x4470696C, 0x61747369, 0x0065636E,
69 0x00070006, 0x0000002F, 0x00000003, 0x435F6C67, 0x446C6C75, 0x61747369,
70 0x0065636E, 0x00030005, 0x00000031, 0x00000000, 0x00050005, 0x00000033,
71 0x6A6F7250, 0x69746365, 0x00006E6F, 0x00060006, 0x00000033, 0x00000000,
72 0x6A6F7270, 0x69746365, 0x00006E6F, 0x00040005, 0x00000035, 0x6A6F7270,
73 0x00000000, 0x00060005, 0x0000003E, 0x565F6C67, 0x65747265, 0x646E4978,
74 0x00007865, 0x00050005, 0x0000004B, 0x63726963, 0x6F43656C, 0x00726F6C,
75 0x00060005, 0x00000050, 0x63726963, 0x6150656C, 0x736D6172, 0x00000000,
76 0x00040048, 0x0000000F, 0x00000000, 0x00000005, 0x00050048, 0x0000000F,
77 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x0000000F, 0x00000000,
78 0x00000007, 0x00000010, 0x00050048, 0x0000000F, 0x00000001, 0x00000023,
79 0x00000040, 0x00050048, 0x0000000F, 0x00000002, 0x00000023, 0x00000050,
80 0x00050048, 0x0000000F, 0x00000003, 0x00000023, 0x00000060, 0x00030047,
81 0x0000000F, 0x00000002, 0x00050048, 0x0000002F, 0x00000000, 0x0000000B,
82 0x00000000, 0x00050048, 0x0000002F, 0x00000001, 0x0000000B, 0x00000001,
83 0x00050048, 0x0000002F, 0x00000002, 0x0000000B, 0x00000003, 0x00050048,
84 0x0000002F, 0x00000003, 0x0000000B, 0x00000004, 0x00030047, 0x0000002F,
85 0x00000002, 0x00040048, 0x00000033, 0x00000000, 0x00000005, 0x00050048,
86 0x00000033, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000033,
87 0x00000000, 0x00000007, 0x00000010, 0x00030047, 0x00000033, 0x00000002,
88 0x00040047, 0x00000035, 0x00000022, 0x00000000, 0x00040047, 0x00000035,
89 0x00000021, 0x00000000, 0x00040047, 0x0000003E, 0x0000000B, 0x0000002A,
90 0x00040047, 0x0000004B, 0x0000001E, 0x00000000, 0x00040047, 0x00000050,
91 0x0000001E, 0x00000001, 0x00020013, 0x00000002, 0x00030021, 0x00000003,
92 0x00000002, 0x00030016, 0x00000006, 0x00000020, 0x00040017, 0x00000007,
93 0x00000006, 0x00000002, 0x00040015, 0x00000008, 0x00000020, 0x00000000,
94 0x0004002B, 0x00000008, 0x00000009, 0x00000004, 0x0004001C, 0x0000000A,
95 0x00000007, 0x00000009, 0x00040020, 0x0000000B, 0x00000007, 0x0000000A,
96 0x00040017, 0x0000000D, 0x00000006, 0x00000004, 0x00040018, 0x0000000E,
97 0x0000000D, 0x00000004, 0x0006001E, 0x0000000F, 0x0000000E, 0x0000000D,
98 0x0000000D, 0x0000000D, 0x00040020, 0x00000010, 0x00000009, 0x0000000F,
99 0x0004003B, 0x00000010, 0x00000011, 0x00000009, 0x00040015, 0x00000012,
100 0x00000020, 0x00000001, 0x0004002B, 0x00000012, 0x00000013, 0x00000001,
101 0x0004002B, 0x00000008, 0x00000014, 0x00000000, 0x00040020, 0x00000015,
102 0x00000009, 0x00000006, 0x0004002B, 0x00000008, 0x00000018, 0x00000001,
103 0x0004002B, 0x00000008, 0x0000001E, 0x00000003, 0x0004002B, 0x00000008,
104 0x00000022, 0x00000002, 0x0004001C, 0x0000002E, 0x00000006, 0x00000018,
105 0x0006001E, 0x0000002F, 0x0000000D, 0x00000006, 0x0000002E, 0x0000002E,
106 0x00040020, 0x00000030, 0x00000003, 0x0000002F, 0x0004003B, 0x00000030,
107 0x00000031, 0x00000003, 0x0004002B, 0x00000012, 0x00000032, 0x00000000,
108 0x0003001E, 0x00000033, 0x0000000E, 0x00040020, 0x00000034, 0x00000002,
109 0x00000033, 0x0004003B, 0x00000034, 0x00000035, 0x00000002, 0x00040020,
110 0x00000036, 0x00000002, 0x0000000E, 0x00040020, 0x00000039, 0x00000009,
111 0x0000000E, 0x00040020, 0x0000003D, 0x00000001, 0x00000012, 0x0004003B,
112 0x0000003D, 0x0000003E, 0x00000001, 0x00040020, 0x00000040, 0x00000007,
113 0x00000007, 0x0004002B, 0x00000006, 0x00000043, 0x00000000, 0x0004002B,
114 0x00000006, 0x00000044, 0x3F800000, 0x00040020, 0x00000049, 0x00000003,
115 0x0000000D, 0x0004003B, 0x00000049, 0x0000004B, 0x00000003, 0x0004002B,
116 0x00000012, 0x0000004C, 0x00000003, 0x00040020, 0x0000004D, 0x00000009,
117 0x0000000D, 0x0004003B, 0x00000049, 0x00000050, 0x00000003, 0x0004002B,
118 0x00000012, 0x00000051, 0x00000002, 0x0004002B, 0x00000006, 0x00000059,
119 0x40000000, 0x00040020, 0x0000005B, 0x00000003, 0x00000006, 0x00050036,
120 0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x000200F8, 0x00000005,
121 0x0004003B, 0x0000000B, 0x0000000C, 0x00000007, 0x00060041, 0x00000015,
122 0x00000016, 0x00000011, 0x00000013, 0x00000014, 0x0004003D, 0x00000006,
123 0x00000017, 0x00000016, 0x00060041, 0x00000015, 0x00000019, 0x00000011,
124 0x00000013, 0x00000018, 0x0004003D, 0x00000006, 0x0000001A, 0x00000019,
125 0x00050050, 0x00000007, 0x0000001B, 0x00000017, 0x0000001A, 0x00060041,
126 0x00000015, 0x0000001C, 0x00000011, 0x00000013, 0x00000014, 0x0004003D,
127 0x00000006, 0x0000001D, 0x0000001C, 0x00060041, 0x00000015, 0x0000001F,
128 0x00000011, 0x00000013, 0x0000001E, 0x0004003D, 0x00000006, 0x00000020,
129 0x0000001F, 0x00050050, 0x00000007, 0x00000021, 0x0000001D, 0x00000020,
130 0x00060041, 0x00000015, 0x00000023, 0x00000011, 0x00000013, 0x00000022,
131 0x0004003D, 0x00000006, 0x00000024, 0x00000023, 0x00060041, 0x00000015,
132 0x00000025, 0x00000011, 0x00000013, 0x00000018, 0x0004003D, 0x00000006,
133 0x00000026, 0x00000025, 0x00050050, 0x00000007, 0x00000027, 0x00000024,
134 0x00000026, 0x00060041, 0x00000015, 0x00000028, 0x00000011, 0x00000013,
135 0x00000022, 0x0004003D, 0x00000006, 0x00000029, 0x00000028, 0x00060041,
136 0x00000015, 0x0000002A, 0x00000011, 0x00000013, 0x0000001E, 0x0004003D,
137 0x00000006, 0x0000002B, 0x0000002A, 0x00050050, 0x00000007, 0x0000002C,
138 0x00000029, 0x0000002B, 0x00070050, 0x0000000A, 0x0000002D, 0x0000001B,
139 0x00000021, 0x00000027, 0x0000002C, 0x0003003E, 0x0000000C, 0x0000002D,
140 0x00050041, 0x00000036, 0x00000037, 0x00000035, 0x00000032, 0x0004003D,
141 0x0000000E, 0x00000038, 0x00000037, 0x00050041, 0x00000039, 0x0000003A,
142 0x00000011, 0x00000032, 0x0004003D, 0x0000000E, 0x0000003B, 0x0000003A,
143 0x00050092, 0x0000000E, 0x0000003C, 0x00000038, 0x0000003B, 0x0004003D,
144 0x00000012, 0x0000003F, 0x0000003E, 0x00050041, 0x00000040, 0x00000041,
145 0x0000000C, 0x0000003F, 0x0004003D, 0x00000007, 0x00000042, 0x00000041,
146 0x00050051, 0x00000006, 0x00000045, 0x00000042, 0x00000000, 0x00050051,
147 0x00000006, 0x00000046, 0x00000042, 0x00000001, 0x00070050, 0x0000000D,
148 0x00000047, 0x00000045, 0x00000046, 0x00000043, 0x00000044, 0x00050091,
149 0x0000000D, 0x00000048, 0x0000003C, 0x00000047, 0x00050041, 0x00000049,
150 0x0000004A, 0x00000031, 0x00000032, 0x0003003E, 0x0000004A, 0x00000048,
151 0x00050041, 0x0000004D, 0x0000004E, 0x00000011, 0x0000004C, 0x0004003D,
152 0x0000000D, 0x0000004F, 0x0000004E, 0x0003003E, 0x0000004B, 0x0000004F,
153 0x00050041, 0x0000004D, 0x00000052, 0x00000011, 0x00000051, 0x0004003D,
154 0x0000000D, 0x00000053, 0x00000052, 0x0003003E, 0x00000050, 0x00000053,
155 0x00060041, 0x00000015, 0x00000054, 0x00000011, 0x00000013, 0x00000014,
156 0x0004003D, 0x00000006, 0x00000055, 0x00000054, 0x00060041, 0x00000015,
157 0x00000056, 0x00000011, 0x00000013, 0x00000022, 0x0004003D, 0x00000006,
158 0x00000057, 0x00000056, 0x00050081, 0x00000006, 0x00000058, 0x00000055,
159 0x00000057, 0x00050088, 0x00000006, 0x0000005A, 0x00000058, 0x00000059,
160 0x00050041, 0x0000005B, 0x0000005C, 0x00000050, 0x00000014, 0x0003003E,
161 0x0000005C, 0x0000005A, 0x00060041, 0x00000015, 0x0000005D, 0x00000011,
162 0x00000013, 0x00000018, 0x0004003D, 0x00000006, 0x0000005E, 0x0000005D,
163 0x00060041, 0x00000015, 0x0000005F, 0x00000011, 0x00000013, 0x0000001E,
164 0x0004003D, 0x00000006, 0x00000060, 0x0000005F, 0x00050081, 0x00000006,
165 0x00000061, 0x0000005E, 0x00000060, 0x00050088, 0x00000006, 0x00000062,
166 0x00000061, 0x00000059, 0x00050041, 0x0000005B, 0x00000063, 0x00000050,
167 0x00000018, 0x0003003E, 0x00000063, 0x00000062, 0x000100FD, 0x00010038
173 "#extension GL_ARB_separate_shader_objects : enable\n"
174 "layout(location = 0) in vec4 circleColor;\n"
175 "layout(location = 1) in vec4 circleParams;\n"
176 "layout(location = 0) out vec4 fragColor;\n"
178 " float dis = distance(circleParams.xy, gl_FragCoord.xy);\n"
179 " float mult1 = smoothstep(circleParams.z + 0.5, circleParams.z - 0.5, dis);\n"
180 " float mult2 = smoothstep((circleParams.z - circleParams.w) - 0.5, (circleParams.z - circleParams.w) + 0.5, dis);\n"
181 " fragColor = circleColor * vec4(1.0, 1.0, 1.0, mult1 * mult2);\n"
184 0x07230203, 0x00010300, 0x00080008, 0x0000003A, 0x00000000, 0x00020011,
185 0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
186 0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0009000F, 0x00000004,
187 0x00000004, 0x6E69616D, 0x00000000, 0x0000000B, 0x0000000F, 0x00000031,
188 0x00000032, 0x00030010, 0x00000004, 0x00000007, 0x00030003, 0x00000002,
189 0x000001C2, 0x00090004, 0x415F4C47, 0x735F4252, 0x72617065, 0x5F657461,
190 0x64616873, 0x6F5F7265, 0x63656A62, 0x00007374, 0x00040005, 0x00000004,
191 0x6E69616D, 0x00000000, 0x00030005, 0x00000008, 0x00736964, 0x00060005,
192 0x0000000B, 0x63726963, 0x6150656C, 0x736D6172, 0x00000000, 0x00060005,
193 0x0000000F, 0x465F6C67, 0x43676172, 0x64726F6F, 0x00000000, 0x00040005,
194 0x00000013, 0x746C756D, 0x00000031, 0x00040005, 0x00000020, 0x746C756D,
195 0x00000032, 0x00050005, 0x00000031, 0x67617266, 0x6F6C6F43, 0x00000072,
196 0x00050005, 0x00000032, 0x63726963, 0x6F43656C, 0x00726F6C, 0x00040047,
197 0x0000000B, 0x0000001E, 0x00000001, 0x00040047, 0x0000000F, 0x0000000B,
198 0x0000000F, 0x00040047, 0x00000031, 0x0000001E, 0x00000000, 0x00040047,
199 0x00000032, 0x0000001E, 0x00000000, 0x00020013, 0x00000002, 0x00030021,
200 0x00000003, 0x00000002, 0x00030016, 0x00000006, 0x00000020, 0x00040020,
201 0x00000007, 0x00000007, 0x00000006, 0x00040017, 0x00000009, 0x00000006,
202 0x00000004, 0x00040020, 0x0000000A, 0x00000001, 0x00000009, 0x0004003B,
203 0x0000000A, 0x0000000B, 0x00000001, 0x00040017, 0x0000000C, 0x00000006,
204 0x00000002, 0x0004003B, 0x0000000A, 0x0000000F, 0x00000001, 0x00040015,
205 0x00000014, 0x00000020, 0x00000000, 0x0004002B, 0x00000014, 0x00000015,
206 0x00000002, 0x00040020, 0x00000016, 0x00000001, 0x00000006, 0x0004002B,
207 0x00000006, 0x00000019, 0x3F000000, 0x0004002B, 0x00000014, 0x00000023,
208 0x00000003, 0x00040020, 0x00000030, 0x00000003, 0x00000009, 0x0004003B,
209 0x00000030, 0x00000031, 0x00000003, 0x0004003B, 0x0000000A, 0x00000032,
210 0x00000001, 0x0004002B, 0x00000006, 0x00000034, 0x3F800000, 0x00050036,
211 0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x000200F8, 0x00000005,
212 0x0004003B, 0x00000007, 0x00000008, 0x00000007, 0x0004003B, 0x00000007,
213 0x00000013, 0x00000007, 0x0004003B, 0x00000007, 0x00000020, 0x00000007,
214 0x0004003D, 0x00000009, 0x0000000D, 0x0000000B, 0x0007004F, 0x0000000C,
215 0x0000000E, 0x0000000D, 0x0000000D, 0x00000000, 0x00000001, 0x0004003D,
216 0x00000009, 0x00000010, 0x0000000F, 0x0007004F, 0x0000000C, 0x00000011,
217 0x00000010, 0x00000010, 0x00000000, 0x00000001, 0x0007000C, 0x00000006,
218 0x00000012, 0x00000001, 0x00000043, 0x0000000E, 0x00000011, 0x0003003E,
219 0x00000008, 0x00000012, 0x00050041, 0x00000016, 0x00000017, 0x0000000B,
220 0x00000015, 0x0004003D, 0x00000006, 0x00000018, 0x00000017, 0x00050081,
221 0x00000006, 0x0000001A, 0x00000018, 0x00000019, 0x00050041, 0x00000016,
222 0x0000001B, 0x0000000B, 0x00000015, 0x0004003D, 0x00000006, 0x0000001C,
223 0x0000001B, 0x00050083, 0x00000006, 0x0000001D, 0x0000001C, 0x00000019,
224 0x0004003D, 0x00000006, 0x0000001E, 0x00000008, 0x0008000C, 0x00000006,
225 0x0000001F, 0x00000001, 0x00000031, 0x0000001A, 0x0000001D, 0x0000001E,
226 0x0003003E, 0x00000013, 0x0000001F, 0x00050041, 0x00000016, 0x00000021,
227 0x0000000B, 0x00000015, 0x0004003D, 0x00000006, 0x00000022, 0x00000021,
228 0x00050041, 0x00000016, 0x00000024, 0x0000000B, 0x00000023, 0x0004003D,
229 0x00000006, 0x00000025, 0x00000024, 0x00050083, 0x00000006, 0x00000026,
230 0x00000022, 0x00000025, 0x00050083, 0x00000006, 0x00000027, 0x00000026,
231 0x00000019, 0x00050041, 0x00000016, 0x00000028, 0x0000000B, 0x00000015,
232 0x0004003D, 0x00000006, 0x00000029, 0x00000028, 0x00050041, 0x00000016,
233 0x0000002A, 0x0000000B, 0x00000023, 0x0004003D, 0x00000006, 0x0000002B,
234 0x0000002A, 0x00050083, 0x00000006, 0x0000002C, 0x00000029, 0x0000002B,
235 0x00050081, 0x00000006, 0x0000002D, 0x0000002C, 0x00000019, 0x0004003D,
236 0x00000006, 0x0000002E, 0x00000008, 0x0008000C, 0x00000006, 0x0000002F,
237 0x00000001, 0x00000031, 0x00000027, 0x0000002D, 0x0000002E, 0x0003003E,
238 0x00000020, 0x0000002F, 0x0004003D, 0x00000009, 0x00000033, 0x00000032,
239 0x0004003D, 0x00000006, 0x00000035, 0x00000013, 0x0004003D, 0x00000006,
240 0x00000036, 0x00000020, 0x00050085, 0x00000006, 0x00000037, 0x00000035,
241 0x00000036, 0x00070050, 0x00000009, 0x00000038, 0x00000034, 0x00000034,
242 0x00000034, 0x00000037, 0x00050085, 0x00000009, 0x00000039, 0x00000033,
243 0x00000038, 0x0003003E, 0x00000031, 0x00000039, 0x000100FD, 0x00010038
273 m_vulkanFuncs->vkCmdBindDescriptorSets(currentcmdbuf, VK_PIPELINE_BIND_POINT_GRAPHICS,
276 auto range =
static_cast<float>(
m_range);
280 float incr = 0.8F / count;
283 for (
int i = 0; i < count; i++)
293 m_vulkanFuncs->vkCmdPushConstants(currentcmdbuf, layout, VK_SHADER_STAGE_VERTEX_BIT,
326 QMatrix4x4 transform;