[oden] I gotta re-think scale and whatnot.
This commit is contained in:
parent
ecce7b64eb
commit
079006acdc
2 changed files with 11 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue