mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
irradiance: use textureSampleLevel for WebGPU support (#11893)
# Objective - Fixes #11879 ## Solution - Use `textureSampleLevel` instead of `textureSample` Co-authored-by: Griffin <33357138+DGriffin91@users.noreply.github.com>
This commit is contained in:
parent
9505f6e6a9
commit
9a2ce8e31b
1 changed files with 3 additions and 3 deletions
|
@ -42,9 +42,9 @@ fn irradiance_volume_light(world_position: vec3<f32>, N: vec3<f32>) -> vec3<f32>
|
|||
let uvw_y = uvw + vec3(0.0f, neg_offset.y, 1.0f / 3.0f);
|
||||
let uvw_z = uvw + vec3(0.0f, neg_offset.z, 2.0f / 3.0f);
|
||||
|
||||
let rgb_x = textureSample(irradiance_volume_texture, irradiance_volume_sampler, uvw_x).rgb;
|
||||
let rgb_y = textureSample(irradiance_volume_texture, irradiance_volume_sampler, uvw_y).rgb;
|
||||
let rgb_z = textureSample(irradiance_volume_texture, irradiance_volume_sampler, uvw_z).rgb;
|
||||
let rgb_x = textureSampleLevel(irradiance_volume_texture, irradiance_volume_sampler, uvw_x, 0.0).rgb;
|
||||
let rgb_y = textureSampleLevel(irradiance_volume_texture, irradiance_volume_sampler, uvw_y, 0.0).rgb;
|
||||
let rgb_z = textureSampleLevel(irradiance_volume_texture, irradiance_volume_sampler, uvw_z, 0.0).rgb;
|
||||
|
||||
// Use Valve's formula to sample.
|
||||
let NN = N * N;
|
||||
|
|
Loading…
Reference in a new issue