Skip to content

Commit

Permalink
Use texture sample level
Browse files Browse the repository at this point in the history
Missed this when porting things over.
  • Loading branch information
jgayfer committed Aug 4, 2024
1 parent 89fa277 commit d42c4fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/light_map/light_map.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn attenuation(light: PointLight2d, dist: f32) -> f32 {

fn get_distance(pos: vec2<f32>) -> f32 {
let uv = ndc_to_uv(world_to_ndc(pos));
let dist = textureSample(sdf, sdf_sampler, uv).r;
let dist = textureSampleLevel(sdf, sdf_sampler, uv, 0.0).r;
return dist;
}

Expand Down

0 comments on commit d42c4fb

Please sign in to comment.