wgpu/naga/tests/in/sample-cube-array-depth-lod.wgsl
Christian Schwarz 2382c8e74f
Fix glsl backend errors regarding samplerCubeArrayShadow (#5171)
* add GL_EXT_texture_shadow_lod feature detection

* allow more cases of cube depth texture sampling in glsl

* add test for sampling a cubemap array depth texture with lod

* add test for chosing GL_EXT_texture_shadow_lod over the grad workaround if instructed

* add changelog entry for GL_EXT_texture_shadow_lod

* fix criteria for requiring and using TEXTURE_SHADOW_LOD

* require gles 320 for textureSampling over cubeArrayShadow

* prevent false positives in TEXTURE_SHADOW_LOD in checks

* make workaround_lod_with_grad usecase selection less context dependant

* move 3d array texture error into the validator

* correct ImageSample logic errors
2024-02-08 18:27:58 +01:00

13 lines
396 B
WebGPU Shading Language

// see https://github.com/gfx-rs/wgpu/issues/4455
@group(0) @binding(0) var texture: texture_depth_cube_array;
@group(0) @binding(1) var texture_sampler: sampler_comparison;
@fragment
fn main() -> @location(0) f32 {
let pos = vec3<f32>(0.0);
let array_index: i32 = 0;
let depth: f32 = 0.0;
return textureSampleCompareLevel(texture, texture_sampler, pos, array_index, depth);
}