Skip to content

Commit b4b9bee

Browse files
authoredOct 5, 2021
Reduce shadow jitter (#11668)
1 parent bc71622 commit b4b9bee

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed
 

‎src/client/shadows/dynamicshadows.cpp

-17
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,7 @@ void DirectionalLight::createSplitMatrices(const Camera *cam)
6565
// boundVec.getLength();
6666
float vvolume = radius * 2.0f;
6767

68-
float texelsPerUnit = getMapResolution() / vvolume;
69-
m4f mTexelScaling;
70-
mTexelScaling.setScale(texelsPerUnit);
71-
72-
m4f mLookAt, mLookAtInv;
73-
74-
mLookAt.buildCameraLookAtMatrixLH(v3f(0.0f, 0.0f, 0.0f), -direction, v3f(0.0f, 1.0f, 0.0f));
75-
76-
mLookAt *= mTexelScaling;
77-
mLookAtInv = mLookAt;
78-
mLookAtInv.makeInverse();
79-
8068
v3f frustumCenter = newCenter;
81-
mLookAt.transformVect(frustumCenter);
82-
frustumCenter.X = floorf(frustumCenter.X); // clamp to texel increment
83-
frustumCenter.Y = floorf(frustumCenter.Y); // clamp to texel increment
84-
frustumCenter.Z = floorf(frustumCenter.Z);
85-
mLookAtInv.transformVect(frustumCenter);
8669
// probar radius multipliacdor en funcion del I, a menor I mas multiplicador
8770
v3f eye_displacement = direction * vvolume;
8871

0 commit comments

Comments
 (0)
Please sign in to comment.