From cfdf56e94b9cad27a824b8e2cd5a14d8f85b6692 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Mon, 13 Oct 2008 18:44:18 +0000 Subject: [PATCH] shadow projection cleanup git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3001 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/vertmodel.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/vertmodel.h b/source/src/vertmodel.h index e93dc5cf..4e7f0793 100644 --- a/source/src/vertmodel.h +++ b/source/src/vertmodel.h @@ -1159,12 +1159,12 @@ struct vertmodel : model lasttexcoordarray = NULL; } - shadowtexgenS.x = ((x2*c - y2*s) - (x1*c - y2*s)) / (2*shadowrad*2*shadowrad); - shadowtexgenS.y = ((y2*c + x2*s) - (y2*c + x1*s)) / (2*shadowrad*2*shadowrad); + shadowtexgenS.x = c / (2*shadowrad); + shadowtexgenS.y = s / (2*shadowrad); shadowtexgenS.z = -(x1*c - y2*s + o.x)*shadowtexgenS.x - (y2*c + x1*s + o.y)*shadowtexgenS.y; - shadowtexgenT.x = ((x1*c - y1*s) - (x1*c - y2*s)) / (2*shadowrad*2*shadowrad); - shadowtexgenT.y = ((y1*c + x1*s) - (y2*c + x1*s)) / (2*shadowrad*2*shadowrad); + shadowtexgenT.x = s / (2*shadowrad); + shadowtexgenT.y = -c / (2*shadowrad); shadowtexgenT.z = -(x1*c - y2*s + o.x)*shadowtexgenT.x - (y2*c + x1*s + o.y)*shadowtexgenT.y; ::rendershadow(int(floor(o.x-shadowrad)), int(floor(o.y-shadowrad)), int(ceil(o.x+shadowrad)), int(ceil(o.y+shadowrad)));