removed the extra stuff from the kernels. Having some issues with the layouts not agreeing with the set size...

This commit is contained in:
2019-08-11 17:23:58 -07:00
parent dfd4cbb6a2
commit 0be20eb959
11 changed files with 21 additions and 92 deletions

View File

@@ -1,12 +1,8 @@
#version 450
layout(location = 0) in vec2 tex_coords;
layout(location = 1) in vec4 out_color;
layout(location = 0) in vec4 out_color;
layout(location = 0) out vec4 f_color;
layout(set = 0, binding = 0) uniform sampler2D tex;
layout(set = 0, binding = 1, rgba32ui) readonly uniform uimage2D img;
void main() {
f_color = out_color;
}

View File

@@ -2,8 +2,7 @@
layout(location = 0) in vec2 position;
layout(location = 1) in vec4 color;
layout(location = 0) out vec2 tex_coords;
layout(location = 1) out vec4 out_color;
layout(location = 0) out vec4 out_color;
void main() {
out_color = color;

View File

@@ -1,21 +1,18 @@
#version 450
layout(location = 0) in vec2 tex_coords;
layout(location = 1) in vec4 out_color;
layout(location = 0) out vec4 f_color;
layout(set = 0, binding = 0) uniform sampler2D tex;
layout(set = 0, binding = 1, rgba32ui) readonly uniform uimage2D img;
void main() {
ivec2 pos = ivec2(gl_FragCoord.x, gl_FragCoord.y);
f_color = imageLoad(img, ivec2(pos)) / (255.0);
// f_color = imageLoad(img, ivec2(pos)) / (255.0);
//
// float gamma = 0.5;
// f_color.rgb = pow(f_color.rgb, vec3(1.0/gamma));
float gamma = 0.5;
f_color.rgb = pow(f_color.rgb, vec3(1.0/gamma));
//f_color = out_color;
// f_color = texture(tex, tex_coords);
f_color = texture(tex, tex_coords);
}

View File

@@ -1,12 +1,9 @@
#version 450
layout(location = 0) in vec2 position;
layout(location = 1) in vec4 color;
layout(location = 0) out vec2 tex_coords;
layout(location = 1) out vec4 out_color;
void main() {
out_color = color;
gl_Position = vec4(position, 0.0, 1.0);
tex_coords = position;