4sides quad
This commit is contained in:
parent
534f1a109a
commit
7fe7015774
13 changed files with 784 additions and 52 deletions
shaders
27
shaders/rt_quad.vert
Normal file
27
shaders/rt_quad.vert
Normal file
|
@ -0,0 +1,27 @@
|
|||
#version 450
|
||||
|
||||
layout(binding = 0) uniform UniformBufferObject {
|
||||
mat4 model;
|
||||
mat4 geom_rot;
|
||||
mat4 view;
|
||||
mat4 proj;
|
||||
bool[16] use_geom_shader;
|
||||
} ubo;
|
||||
|
||||
|
||||
layout(location = 0) in vec3 inPosition;
|
||||
layout(location = 1) in uvec2 inRasterPos;
|
||||
layout(location = 2) in uint inVolumeStart;
|
||||
|
||||
layout(location = 0) out uvec2 rasterPos;
|
||||
layout(location = 1) out uint volumeStart;
|
||||
|
||||
void main() {
|
||||
if (ubo.use_geom_shader[0]) {
|
||||
gl_Position = ubo.geom_rot * ubo.model * vec4(inPosition, 1.0);
|
||||
} else {
|
||||
gl_Position = ubo.proj * ubo.view * ubo.geom_rot * ubo.model * vec4(inPosition, 1.0);
|
||||
}
|
||||
rasterPos = inRasterPos;
|
||||
volumeStart = inVolumeStart;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue