FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
554 stars 107 forks source link

Buggy studio shadows in latest build #199

Closed ma-choo closed 7 years ago

ma-choo commented 7 years ago

Seems the latest update to studiomodel renderer has messed up studiomodel shadows. They worked fine in the old Win32 release.

reg bug

mittorn commented 7 years ago

try r_studio_drawelements 0

a1batross commented 7 years ago

I can't get it working even if r_studio_drawelements was set to 0. =/

ma-choo commented 7 years ago

r_studio_drawelements changes it, but they're still broken.

Also, when capturing the glitch with the "snapshot" command, the parts where the shadows are drawn are semi-transparent in the BMP. Very odd. They don't appear like that in normal gameplay.

t0a0d_0002

TacoDeBoss commented 7 years ago

Sorry to bump the thread, but I wasn't even aware the engine had shadows. How are you supposed to enable them in the first place?

ma-choo commented 7 years ago

@TacoDeBoss Make the "if(r_shadows.value)" statement in the GL_StudioDrawShadow function return true, or just remove the if statement completely. https://github.com/FWGS/xash3d/blob/master/engine/client/gl_studio.c#L3022

TacoDeBoss commented 7 years ago

@ShaunNoWay Must only work in Windows, or else I'm screwing it up. Messed with that every way I could and it made no difference.

ma-choo commented 7 years ago

@TacoDeBoss May I ask what you did? Just changing the line to "if( true )" does it for me. I am on Windows, though.

ma-choo commented 7 years ago

Of course, shadows are super bugged right now and very hard to see unless under specific circumstances. bug

Try settting r_studio_drawelements to 0 and see if that makes a difference. range

TacoDeBoss commented 7 years ago

c1a0d_0001

@ShaunNoWay Yeah, I did just that with no luck. Mine is a slightly older build because I'm having trouble compiling the newest version on Linux.

EDIT: I got the new version to compile. No idea why I had trouble last night. Still same build number: 540. Apparently Windows is ahead of Linux?

EDIT 2: No, I'm just a moron and forgot that I had old files that I was preloading to.

mittorn commented 7 years ago

It is not fixed yet, update will not help. It is because we replaced old glBegin/glEnd studio renderer but new one, that uses glDrawElements. Somthing wrong with shadows and it need to be fixed (maybe use fallback code when shadows enabled)

a1batross commented 7 years ago

Fixed.

a1batross commented 6 years ago

https://github.com/FWGS/xash3d/commit/81d5f0a30eaa5afe9e4d9fe0d0e1e2504de80ac5

Uhm. This commit fixes them again.