wasn't the layout. It was the colors being bound between 0-1 instead of 255 like I was expecting
This commit is contained in:
@@ -6,7 +6,7 @@ layout(set = 0, binding = 1, rgba8ui) readonly uniform uimage2D img;
|
|||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
vec2 onePixel = vec2(1.0, 1.0) / (720.0, 756.0);
|
vec2 onePixel = vec2(1.0, 1.0) / (720.0, 756.0);
|
||||||
vec2 pos = tex_coords + onePixel * vec2(0, 0);
|
vec2 pos = tex_coords * onePixel;
|
||||||
ivec2 ipos = ivec2(pos);
|
ivec2 ipos = ivec2(pos);
|
||||||
vec4 colorSum = imageLoad(img, ipos);
|
vec4 colorSum = imageLoad(img, ipos);
|
||||||
f_color = colorSum;
|
f_color = colorSum;
|
||||||
@@ -15,5 +15,13 @@ void main() {
|
|||||||
// f_color = texture(tex, tex_coords);
|
// f_color = texture(tex, tex_coords);
|
||||||
// ivec2 t = ivec2(tex_coords.x, tex_coords.y );
|
// ivec2 t = ivec2(tex_coords.x, tex_coords.y );
|
||||||
|
|
||||||
|
ivec2 size = ivec2(gl_FragCoord.x, gl_FragCoord.y);
|
||||||
|
//ivec2 size = ivec2(0, 0);
|
||||||
|
|
||||||
|
f_color = imageLoad(img, size) / (200);
|
||||||
|
// f_color.w = 0;
|
||||||
|
// f_color.r = 75;
|
||||||
|
// f_color.g = 30;
|
||||||
|
// f_color.b =;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -44,6 +44,7 @@ use shaderc::CompileOptions;
|
|||||||
use shade_runner::CompileError;
|
use shade_runner::CompileError;
|
||||||
use crate::workpiece::{WorkpieceLoader, Workpiece};
|
use crate::workpiece::{WorkpieceLoader, Workpiece};
|
||||||
use winit::{EventsLoop, WindowBuilder, WindowEvent, Event};
|
use winit::{EventsLoop, WindowBuilder, WindowEvent, Event};
|
||||||
|
use winit::dpi::LogicalSize;
|
||||||
use vulkano_win::VkSurfaceBuild;
|
use vulkano_win::VkSurfaceBuild;
|
||||||
|
|
||||||
|
|
||||||
@@ -67,6 +68,7 @@ fn main() {
|
|||||||
|
|
||||||
let mut events_loop = EventsLoop::new();
|
let mut events_loop = EventsLoop::new();
|
||||||
let mut surface = WindowBuilder::new()
|
let mut surface = WindowBuilder::new()
|
||||||
|
.with_dimensions(LogicalSize::from((800, 800)))
|
||||||
.build_vk_surface(&events_loop, instance.clone()).unwrap();
|
.build_vk_surface(&events_loop, instance.clone()).unwrap();
|
||||||
let mut window = surface.window();
|
let mut window = surface.window();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user