From 0f5fe527dd6eafa5535ba8f123ca0b0e2f0ea151 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Tue, 19 Feb 2019 14:37:44 -0600 Subject: [PATCH] sample surface roughness for diffuse return. 0 means sharpest possible result --- .../shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl index 6b8b09b12..1360c029c 100644 --- a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl +++ b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl @@ -56,7 +56,7 @@ float3 boxProject(float3 wsPosition, float3 wsEyeRay, float3 reflectDir, float3 float3 iblBoxDiffuse( Surface surface, int id) { float3 cubeN = boxProject(surface.P, surface.V, surface.R, inRefPosArray[id].xyz, bbMinArray[id].xyz, bbMaxArray[id].xyz); - return TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR,cubeN,id,0).xyz; + return TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR,cubeN,id,surface.roughness*cubeMips).xyz; } float3 iblBoxSpecular(Surface surface, TORQUE_SAMPLER2D(brdfTexture), int id)