mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Fix dynamic light calculations to be unaffected by wall clipping
This commit is contained in:
parent
6fe124d937
commit
4551052174
1 changed files with 2 additions and 4 deletions
|
@ -545,10 +545,8 @@ static void Draw1Column(int x, int y1, int y2, WallSampler &sampler, void(*draw1
|
|||
float t = (x - WallC.sx1 + 0.5f) / (WallC.sx2 - WallC.sx1);
|
||||
float wcol = w1 * (1.0f - t) + w2 * t;
|
||||
float zcol = 1.0f / wcol;
|
||||
float xcol = (WallC.tleft.X * w1 * (1.0f - t) + WallC.tright.X * w2 * t) * zcol;
|
||||
float ycol = (WallC.tleft.Y * w1 * (1.0f - t) + WallC.tright.Y * w2 * t) * zcol;
|
||||
dc_viewpos.X = xcol;
|
||||
dc_viewpos.Y = ycol;
|
||||
dc_viewpos.X = (float)((x + 0.5 - CenterX) / CenterX * zcol);
|
||||
dc_viewpos.Y = zcol;
|
||||
dc_viewpos.Z = (float)((CenterY - y1 - 0.5) / InvZtoScale * zcol);
|
||||
dc_viewpos_step.Z = (float)(-zcol / InvZtoScale);
|
||||
|
||||
|
|
Loading…
Reference in a new issue