From 81cc00f708f1e28534e23a47b6cb322001bd38fd Mon Sep 17 00:00:00 2001 From: ohmaya Date: Sun, 22 Dec 2019 13:58:04 +0800 Subject: [PATCH] nonuniform scaling => uniform scaling gWorld instead of inverse-transpose of world matrix is used, so you were actually assuming "uniform scaling". --- Chapter 21 Ambient Occlusion/Ssao/Shaders/DrawNormals.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapter 21 Ambient Occlusion/Ssao/Shaders/DrawNormals.hlsl b/Chapter 21 Ambient Occlusion/Ssao/Shaders/DrawNormals.hlsl index a0c04400..45cf020d 100644 --- a/Chapter 21 Ambient Occlusion/Ssao/Shaders/DrawNormals.hlsl +++ b/Chapter 21 Ambient Occlusion/Ssao/Shaders/DrawNormals.hlsl @@ -41,7 +41,7 @@ VertexOut VS(VertexIn vin) // Fetch the material data. MaterialData matData = gMaterialData[gMaterialIndex]; - // Assumes nonuniform scaling; otherwise, need to use inverse-transpose of world matrix. + // Assumes uniform scaling; otherwise, need to use inverse-transpose of world matrix. vout.NormalW = mul(vin.NormalL, (float3x3)gWorld); vout.TangentW = mul(vin.TangentU, (float3x3)gWorld);