getting close, something wrong with copying the buffer. Probably the format that I've selected

This commit is contained in:
2019-07-17 21:53:22 -07:00
parent 26410b78a2
commit 5928eb5dde
3 changed files with 213 additions and 169 deletions

View File

@@ -4,5 +4,16 @@ layout(location = 0) out vec4 f_color;
layout(set = 0, binding = 0) uniform sampler2D tex;
layout(set = 0, binding = 1, rgba8ui) readonly uniform uimage2D img;
void main() {
f_color = texture(tex, tex_coords);
vec2 onePixel = vec2(1.0, 1.0) / (720.0, 756.0);
vec2 pos = tex_coords + onePixel * vec2(0, 0);
ivec2 ipos = ivec2(pos);
vec4 colorSum = imageLoad(img, ipos);
f_color = colorSum;
// f_color = texture(tex, tex_coords);
// ivec2 t = ivec2(tex_coords.x, tex_coords.y );
}