ZDoom / Raze

Build engine port backed by GZDoom tech. Currently supports Duke Nukem 3D, Blood, Shadow Warrior, Redneck Rampage and Powerslave/Exhumed.
697 stars 59 forks source link

[BUG] [SW] Shadows are casted incorrectly #1117

Open ninjakitty844 opened 1 week ago

ninjakitty844 commented 1 week ago

Raze version

Raze 1.10.2

Which game are you running with Raze?

Shadow Warrior

What Operating System are you using?

Windows 11

Please describe your specific OS version

No response

Relevant hardware info

No response

Have you checked that no other similar issue already exists?

A clear and concise description of what the bug is.

Shadow scaling (and squashing) seems very different from DOS.

Notably, if a ghost is really high in the sky, it will cast a shadow so big (2x the size of a ghost) and so unsquashed (1:1 aspect ratio) that it just looks like there's a big transparent ghost in front of you rather than a shadow.

image

This can NEVER happen in DOS. In fact, shadows in DOS SW get smaller the higher an enemy is, eventually seeming to not show at all. In my opinion, DOS was right, this makes more sense. In real life, the closer you are to the surface your shadow is being cast onto, the stronger it is. And the farther you are, the more chance there is for diffused light to weaken your shadow. (but it also just looks better that way because I'm not being hunted by behemoth shadows...)

Steps to reproduce the behaviour.

Explain how to reproduce

  1. Go to level 21 of the Wanton Destruction addon (Redwood Forest)
  2. Gain access to the treetops
  3. Find a ghost up there
  4. go to the base of the trees and observe the ghost's shadow

In DOS: The shadow is at maximum a pixel wide, if not totally gone. In Raze: The shadow is a behemoth, run.

Your configuration

default

Provide a Log

No response

coelckers commented 1 week ago

fixed in c6f19904954c34a23913ec431ca39fb28b024fd8

ninjakitty844 commented 1 week ago

Hey, sorry to bother again, but I checked in latest devbuild and there's still some weirdness going on. It seems like the math is accurate if the enemy and player are at the same elevation, or if the enemy is below the player. But if an enemy is near the player, AND above the player (for example, on a slope walking downwards towards a player), their shadow will grow and become much bigger than expected. I made sure this wasn't the case in DOS. In DOS, enemy shadows shrink and disappear as the player goes below the enemy, instead of growing.

ShadowWarrior_0003 (Seppuku Station, level 1)

ShadowWarrior_0004 (Redwood Forest, level 21 in Wanton Destruction addon) (its usually easy to replicate this bug with this first coolie after the red key elevator)

coelckers commented 21 hours ago

Hint: Do not post in closed bug tickets if you want your messages to be seen!

ninjakitty844 commented 12 hours ago

Hint: Do not post in closed bug tickets if you want your messages to be seen!

My bad about that, I thought it sent a notification to the people who worked on the original issue. I wasn't sure if I should just create another issue when it seemed like the math only needed a small tweak. Noted for the future 👍