Skip to content

VSM_32F shadow filtering checks raw extTextureFloatLinear, forcing nearest filtering on WebGPU #9257

Description

@willeastcott

src/scene/renderer/shadow-map.js:91:

filter = device.extTextureFloatLinear ? FILTER_LINEAR : FILTER_NEAREST;

extTextureFloatLinear is a raw WebGL extension object, set only by the WebGL backend (webgl-graphics-device.js:912) — it is undefined on WebGPU and Null devices. The portable flag for this capability is device.textureFloatFilterable, which is exactly what light.js:503 uses to approve SHADOW_VSM_32F in the first place (and which WebGPU sets from the float32-filterable feature).

Result: on WebGPU, VSM32 shadows are approved by the light but silently sampled with nearest filtering. Line 91 should test device.textureFloatFilterable.

🤖 Found during a code audit with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions