diff --git a/filament/src/ShadowMapManager.cpp b/filament/src/ShadowMapManager.cpp index ac8c70d8d9..6d8f2d7208 100644 --- a/filament/src/ShadowMapManager.cpp +++ b/filament/src/ShadowMapManager.cpp @@ -629,7 +629,8 @@ ShadowMapManager::ShadowTechnique ShadowMapManager::updateCascadeShadowMaps(FEng .textureDimension = uint16_t(options.mapSize), .shadowDimension = uint16_t(options.mapSize - 2u), .textureSpaceFlipped = engine.getBackend() == Backend::METAL || - engine.getBackend() == Backend::VULKAN, + engine.getBackend() == Backend::VULKAN || + engine.getBackend() == Backend::WEBGPU, .vsm = view.hasVSM() }; @@ -806,7 +807,8 @@ void ShadowMapManager::prepareSpotShadowMap(ShadowMap& shadowMap, FEngine& engin .textureDimension = uint16_t(options->mapSize), .shadowDimension = uint16_t(options->mapSize - 2u), .textureSpaceFlipped = engine.getBackend() == Backend::METAL || - engine.getBackend() == Backend::VULKAN, + engine.getBackend() == Backend::VULKAN || + engine.getBackend() == Backend::WEBGPU, .vsm = view.hasVSM() }; @@ -898,7 +900,8 @@ void ShadowMapManager::preparePointShadowMap(ShadowMap& shadowMap, .textureDimension = uint16_t(options->mapSize), .shadowDimension = uint16_t(options->mapSize), // point-lights don't have a border .textureSpaceFlipped = engine.getBackend() == Backend::METAL || - engine.getBackend() == Backend::VULKAN, + engine.getBackend() == Backend::VULKAN || + engine.getBackend() == Backend::WEBGPU, .vsm = view.hasVSM() }; diff --git a/shaders/src/post_process_main.vs b/shaders/src/post_process_main.vs index 32c33aadc1..6f77f2550b 100644 --- a/shaders/src/post_process_main.vs +++ b/shaders/src/post_process_main.vs @@ -19,8 +19,8 @@ void main() { #endif // Adjust clip-space -#if !defined(TARGET_VULKAN_ENVIRONMENT) && !defined(TARGET_METAL_ENVIRONMENT) - // This is not needed in Vulkan or Metal because clipControl is always (1, 0) +#if !defined(TARGET_VULKAN_ENVIRONMENT) && !defined(TARGET_METAL_ENVIRONMENT) && !defined(TARGET_WEBGPU_ENVIRONMENT) + // This is not needed in Vulkan, Metal or WebGPU because clipControl is always (1, 0) // (We don't use a dot() here because it works around a spirv-opt optimization that in turn // causes a crash on PowerVR, see #5118) inputs.position.z = inputs.position.z * frameUniforms.clipControl.x + inputs.position.w * frameUniforms.clipControl.y; diff --git a/shaders/src/surface_main.vs b/shaders/src/surface_main.vs index b71d1be4af..17d32a9fd8 100644 --- a/shaders/src/surface_main.vs +++ b/shaders/src/surface_main.vs @@ -246,8 +246,8 @@ void main() { position.y = -position.y; #endif -#if !defined(TARGET_VULKAN_ENVIRONMENT) && !defined(TARGET_METAL_ENVIRONMENT) - // This is not needed in Vulkan or Metal because clipControl is always (1, 0) +#if !defined(TARGET_VULKAN_ENVIRONMENT) && !defined(TARGET_METAL_ENVIRONMENT) && !defined(TARGET_WEBGPU_ENVIRONMENT) + // This is not needed in Vulkan, Metal or WebGPU because clipControl is always (1, 0) // (We don't use a dot() here because it workaround a spirv-opt optimization that in turn // causes a crash on PowerVR, see #5118) position.z = position.z * frameUniforms.clipControl.x + position.w * frameUniforms.clipControl.y;