first step for compute task
This commit is contained in:
parent
579820334d
commit
c02522b6c2
16 changed files with 470 additions and 32 deletions
shaders
27
shaders/rt_compute.comp
Normal file
27
shaders/rt_compute.comp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#version 450
|
||||
|
||||
|
||||
layout(binding = 0) uniform UniformBufferObject {
|
||||
mat4 model;
|
||||
mat4 geom_rot;
|
||||
mat4 view;
|
||||
mat4 proj;
|
||||
vec3 camera_pos;
|
||||
bool[16] use_geom_shader;
|
||||
} ubo;
|
||||
|
||||
layout(binding = 3) readonly buffer SceneInfoBuffer {
|
||||
uint gridsIn[];
|
||||
};
|
||||
|
||||
layout(binding = 4) buffer SceneInfoBuffer2 {
|
||||
uint volumes[];
|
||||
};
|
||||
|
||||
layout (local_size_x = 256, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
void main() {
|
||||
uint index = gl_GlobalInvocationID.x;
|
||||
|
||||
volumes[index] = gridsIn[index];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue