[oden] I gotta re-think scale and whatnot.

This commit is contained in:
John Doty 2023-08-31 18:19:59 -07:00
parent ecce7b64eb
commit 079006acdc
2 changed files with 11 additions and 9 deletions

View file

@ -40,11 +40,11 @@ struct VertexOutput {
@fragment fn fs_main(in : VertexOutput)->@location(0) vec4<f32> {
// TODO: Should we be sampling here for the shader?
// let tc = vec2(u32(in.tex_coords.x), u32(in.tex_coords.y));
// let c = textureLoad(t_diffuse, tc, 0);
let tc = vec2(u32(in.tex_coords.x), u32(in.tex_coords.y));
let c = textureLoad(t_diffuse, tc, 0);
let tc = in.tex_coords / vec2<f32>(textureDimensions(t_diffuse));
let c = textureSample(t_diffuse, s_diffuse, tc);
// let tc = in.tex_coords / vec2<f32>(textureDimensions(t_diffuse));
// let c = textureSample(t_diffuse, s_diffuse, tc);
return vec4<f32>(c.r,c.r,c.r,c.r);