From bb67bfb9a368f5595197f3fba55175b0869339bf Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 23 Feb 2026 01:43:09 -0800 Subject: [PATCH] Increase normal map Sobel strength and POM scale for character models Hand-painted weapon/armor textures have baked-in lighting that produces low-contrast gradients in the Sobel filter. Bump strength from 2.0 to 5.0 to extract visible surface detail. Also increase POM scale from 0.03 to 0.06 since character models are small with dense UVs where the WMO-tuned 0.03 was barely perceptible. --- src/rendering/character_renderer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rendering/character_renderer.cpp b/src/rendering/character_renderer.cpp index ccf81d25..60590eb0 100644 --- a/src/rendering/character_renderer.cpp +++ b/src/rendering/character_renderer.cpp @@ -447,7 +447,9 @@ std::unique_ptr CharacterRenderer::generateNormalHeightMap( } // Step 2: Sobel 3x3 → normal map (crisp detail from original, blurred for POM alpha) - const float strength = 2.0f; + // Higher strength than WMO (2.0) because character/weapon textures are hand-painted + // with baked-in lighting that produces low-contrast gradients in the Sobel filter. + const float strength = 5.0f; std::vector output(totalPixels * 4); auto sampleH = [&](int x, int y) -> float { @@ -2024,7 +2026,7 @@ void CharacterRenderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, matData.specularIntensity = 0.5f; matData.enableNormalMap = normalMappingEnabled_ ? 1 : 0; matData.enablePOM = pomEnabled_ ? 1 : 0; - matData.pomScale = 0.03f; + matData.pomScale = 0.06f; matData.pomMaxSamples = pomSamples; matData.heightMapVariance = batchHeightVariance; matData.normalMapStrength = normalMapStrength_; @@ -2119,7 +2121,7 @@ void CharacterRenderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, matData.specularIntensity = 0.5f; matData.enableNormalMap = normalMappingEnabled_ ? 1 : 0; matData.enablePOM = pomEnabled_ ? 1 : 0; - matData.pomScale = 0.03f; + matData.pomScale = 0.06f; matData.pomMaxSamples = pomSamples2; matData.heightMapVariance = 0.0f; matData.normalMapStrength = normalMapStrength_;