From b5e23162df33c72029aac0b50a94879d8387907a Mon Sep 17 00:00:00 2001 From: Mustafa Uzun Date: Wed, 11 Oct 2023 13:56:43 +0300 Subject: [PATCH] fix: CameraInfo.clipTransform typo --- filament/src/PerShadowMapUniforms.cpp | 2 +- filament/src/PerViewUniforms.cpp | 2 +- filament/src/PostProcessManager.cpp | 2 +- filament/src/details/Camera.h | 2 +- filament/src/details/Renderer.cpp | 2 +- shaders/src/fog.fs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/filament/src/PerShadowMapUniforms.cpp b/filament/src/PerShadowMapUniforms.cpp index 4dd9dface4d..87b78a9a9e4 100644 --- a/filament/src/PerShadowMapUniforms.cpp +++ b/filament/src/PerShadowMapUniforms.cpp @@ -61,7 +61,7 @@ void PerShadowMapUniforms::prepareCamera(Transaction const& transaction, s.clipFromWorldMatrix[0] = clipFromWorld; // projection * view s.worldFromClipMatrix = worldFromClip; // 1/(projection * view) s.userWorldFromWorldMatrix = mat4f(inverse(camera.worldOrigin)); - s.clipTransform = camera.clipTransfrom; + s.clipTransform = camera.clipTransform; s.cameraFar = camera.zf; s.oneOverFarMinusNear = 1.0f / (camera.zf - camera.zn); s.nearOverFarMinusNear = camera.zn / (camera.zf - camera.zn); diff --git a/filament/src/PerViewUniforms.cpp b/filament/src/PerViewUniforms.cpp index c24c46fab62..4c2b370c384 100644 --- a/filament/src/PerViewUniforms.cpp +++ b/filament/src/PerViewUniforms.cpp @@ -75,7 +75,7 @@ void PerViewUniforms::prepareCamera(FEngine& engine, const CameraInfo& camera) n s.viewFromClipMatrix = viewFromClip; // 1/projection s.worldFromClipMatrix = worldFromClip; // 1/(projection * view) s.userWorldFromWorldMatrix = mat4f(inverse(camera.worldOrigin)); - s.clipTransform = camera.clipTransfrom; + s.clipTransform = camera.clipTransform; s.cameraFar = camera.zf; s.oneOverFarMinusNear = 1.0f / (camera.zf - camera.zn); s.nearOverFarMinusNear = camera.zn / (camera.zf - camera.zn); diff --git a/filament/src/PostProcessManager.cpp b/filament/src/PostProcessManager.cpp index 4f82b2ddcd0..4f176c10142 100644 --- a/filament/src/PostProcessManager.cpp +++ b/filament/src/PostProcessManager.cpp @@ -2503,7 +2503,7 @@ void PostProcessManager::prepareTaa(FrameGraph& fg, filament::Viewport const& sv inoutCameraInfo->projection[2].xy -= jitterInClipSpace; // VERTEX_DOMAIN_DEVICE doesn't apply the projection, but it still needs this // clip transform, so we apply it separately (see main.vs) - inoutCameraInfo->clipTransfrom.zw -= jitterInClipSpace; + inoutCameraInfo->clipTransform.zw -= jitterInClipSpace; fg.addTrivialSideEffectPass("Jitter Camera", [=, &uniforms] (DriverApi& driver) { diff --git a/filament/src/details/Camera.h b/filament/src/details/Camera.h index 776edb2cea6..26e1297c56a 100644 --- a/filament/src/details/Camera.h +++ b/filament/src/details/Camera.h @@ -241,7 +241,7 @@ struct CameraInfo { math::mat4f eyeFromView[CONFIG_STEREOSCOPIC_EYES]; // eye view matrix (only for stereoscopic) math::mat4 worldOrigin; // world origin transform (already applied // to model and view) - math::float4 clipTransfrom{1, 1, 0, 0}; // clip-space transform, only for VERTEX_DOMAIN_DEVICE + math::float4 clipTransform{1, 1, 0, 0}; // clip-space transform, only for VERTEX_DOMAIN_DEVICE float zn{}; // distance (positive) to the near plane float zf{}; // distance (positive) to the far plane float ev100{}; // exposure diff --git a/filament/src/details/Renderer.cpp b/filament/src/details/Renderer.cpp index f36d5c40255..a3cc9026ca6 100644 --- a/filament/src/details/Renderer.cpp +++ b/filament/src/details/Renderer.cpp @@ -598,7 +598,7 @@ void FRenderer::renderJob(ArenaScope& arena, FView& view) { // VERTEX_DOMAIN_DEVICE doesn't apply the projection, but it still needs this // clip transform, so we apply it separately (see main.vs) - cameraInfo.clipTransfrom = { ts[0][0], ts[1][1], ts[3].x, ts[3].y }; + cameraInfo.clipTransform = { ts[0][0], ts[1][1], ts[3].x, ts[3].y }; // adjust svp to the new, larger, rendering dimensions svp.width = uint32_t(width); diff --git a/shaders/src/fog.fs b/shaders/src/fog.fs index 98d5ae928c2..17029480ca1 100644 --- a/shaders/src/fog.fs +++ b/shaders/src/fog.fs @@ -48,7 +48,7 @@ vec4 fog(vec4 color, highp vec3 view) { // when sampling the IBL we need to take into account the IBL transform. We know it's a // a rigid transform, so we can take the transpose instead of the inverse, and for the - // same reason we can use it directly instead of taking the cof() to transfrom a vector. + // same reason we can use it directly instead of taking the cof() to transform a vector. highp mat3 worldFromUserWorldMatrix = transpose(mat3(frameUniforms.userWorldFromWorldMatrix)); fogColor *= textureLod(light_fog, worldFromUserWorldMatrix * view, lod).rgb; }