gsamplerCubeArrayShadow isn't supported in textureGrad, textureLod or texture with bias
问题描述
跑rust的Bevy示例程序
运行3d的示例,cargo run --example 3d_shapes
发现报错:
INFO bevy_render::renderer: AdapterInfo { name: "Mesa Intel(R) Graphics (ADL GT2)", vendor: 32902, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Gl }
ERROR log: Shader translation error for stage ShaderStages(FRAGMENT): gsamplerCubeArrayShadow isn't supported in textureGrad, textureLod or texture with bias
排查
搜索后发现可能是backend问题,但是设置backend为vulkan 未成功
WGPU_BACKEND=vulkan cargo run --example 3d_shapes
Unable to find a GPU! Make sure you have installed required drivers! For extra information, see: https://github.com/bevyengine/bevy/blob/latest/docs/linux_dependencies.md
尝试了一些配置feature,未成功。
发现需要安装gpu的vulkan库,archlinux下是:extra/vulkan-intel
安装后再测试成功显示图形
WGPU_BACKEND=vulkan cargo run --example 3d_shapes