diff --git a/shaders/voxelTopingPS.hlsl b/shaders/voxelTopingPS.hlsl index 26b152d..01c7cfd 100644 --- a/shaders/voxelTopingPS.hlsl +++ b/shaders/voxelTopingPS.hlsl @@ -53,17 +53,18 @@ float4 main(PSInput input) : SV_TARGET0 { float wrap = halfLambert * halfLambert; // squared for falloff shape // Translucency: thin blades let light through from behind - // Simple SSS approximation: light arriving from the back side + // Stronger effect to reduce contrast when orbiting around grass float3 V = normalize(cameraPosition.xyz - input.worldPos); - float backLight = saturate(dot(V, L)); // view aligned with light = backlit - float transAmount = (1.0 - saturate(rawNdotL)) * 0.4; // stronger when facing away from light + float backLight = saturate(dot(V, L)); + float transAmount = (1.0 - saturate(rawNdotL)) * 0.8; float translucency = backLight * transAmount; - // Warm vegetation ambient (higher than stone, slightly green-tinted) - float3 vegAmbient = float3(0.22, 0.28, 0.20); + // Same ambient as voxel faces for color consistency + float3 ambient = float3(0.15, 0.18, 0.25); - float3 diffuse = sunColor.rgb * (wrap * 0.7 + translucency * 0.5); - lit = texColor * (diffuse + vegAmbient); + // Wrap + strong translucency to minimize light/dark contrast + float3 diffuse = sunColor.rgb * (wrap * 0.85 + translucency * 0.6); + lit = texColor * (diffuse + ambient); } return float4(lit, 1.0);