[Scummvm-git-logs] scummvm master -> fbf85bfcc068709d09c487ca17bc10305ff5ee39
aquadran
noreply at scummvm.org
Sat Oct 19 17:07:44 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fbf85bfcc0 WINTERMUTE: Synced AdActor3DX::displayShadowVolume() with original code
Commit: fbf85bfcc068709d09c487ca17bc10305ff5ee39
https://github.com/scummvm/scummvm/commit/fbf85bfcc068709d09c487ca17bc10305ff5ee39
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2024-10-19T19:07:39+02:00
Commit Message:
WINTERMUTE: Synced AdActor3DX::displayShadowVolume() with original code
Changed paths:
engines/wintermute/ad/ad_actor_3dx.cpp
diff --git a/engines/wintermute/ad/ad_actor_3dx.cpp b/engines/wintermute/ad/ad_actor_3dx.cpp
index 19dd7e92238..91e51394a27 100644
--- a/engines/wintermute/ad/ad_actor_3dx.cpp
+++ b/engines/wintermute/ad/ad_actor_3dx.cpp
@@ -466,6 +466,11 @@ bool AdActor3DX::renderModel() {
//////////////////////////////////////////////////////////////////////////
bool AdActor3DX::displayShadowVolume() {
+ DXVector3 pos;
+ DXVector3 target;
+ DXVector3 lightVector;
+ float extrusionDepth;
+
if (!_xmodel) {
return false;
}
@@ -475,8 +480,12 @@ bool AdActor3DX::displayShadowVolume() {
DXVector3 lightPos = DXVector3(_shadowLightPos._x * _scale3D,
_shadowLightPos._y * _scale3D,
_shadowLightPos._z * _scale3D);
- float extrusionDepth = DXVec3Length(&lightPos) * 1.5f;
- DXVec3Normalize(&lightPos, &lightPos);
+ pos = _posVector + lightPos;
+ target = _posVector;
+
+ lightVector = pos - target;
+ extrusionDepth = DXVec3Length(&lightPos) * 1.5f;
+ DXVec3Normalize(&lightVector, &lightVector);
getShadowVolume()->setColor(_shadowColor);
@@ -489,7 +498,7 @@ bool AdActor3DX::displayShadowVolume() {
shadowModel = _xmodel;
}
- shadowModel->updateShadowVol(getShadowVolume(), &_worldMatrix, &lightPos, extrusionDepth);
+ shadowModel->updateShadowVol(getShadowVolume(), &_worldMatrix, &lightVector, extrusionDepth);
DXMatrix origWorld;
_gameRef->_renderer3D->getWorldTransform(&origWorld);
@@ -509,7 +518,8 @@ bool AdActor3DX::displayShadowVolume() {
DXMatrix viewMat;
DXMatrixMultiply(&viewMat, &_worldMatrix, boneMat);
- at->displayShadowVol(&viewMat, &lightPos, extrusionDepth, true);
+
+ at->displayShadowVol(&viewMat, &lightVector, extrusionDepth, true);
}
// restore model's world matrix and render the shadow volume
More information about the Scummvm-git-logs
mailing list