mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
26 lines
454 B
Plaintext
26 lines
454 B
Plaintext
#version 450
|
|
|
|
layout(
|
|
local_size_x = 128,
|
|
local_size_y = 1,
|
|
local_size_z = 1) in;
|
|
|
|
layout(binding = 0)
|
|
writeonly uniform imageBuffer dst;
|
|
|
|
layout(push_constant)
|
|
uniform u_info_t {
|
|
vec4 clear_value;
|
|
ivec4 dst_offset;
|
|
ivec4 dst_extent;
|
|
} u_info;
|
|
|
|
void main() {
|
|
int thread_id = int(gl_GlobalInvocationID.x);
|
|
|
|
if (thread_id < u_info.dst_extent.x) {
|
|
imageStore(dst,
|
|
u_info.dst_offset.x + thread_id,
|
|
u_info.clear_value);
|
|
}
|
|
} |