gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
773 stars 179 forks source link

Turok 3 Incorrect Shadows #543

Open AmbientMalice opened 9 years ago

AmbientMalice commented 9 years ago

I believe Turok 3 uses auxiliary framebuffer for shadows, whereas Turok 2 used stencil shadows. The shadows render better than Glide64, but they're too dark.

GLideN64: gliden64_turok_3 _shadow_of_o_017

Angrylion: ntke0001

gonetz commented 9 years ago

Savestate please.

AmbientMalice commented 9 years ago

https://www.sendspace.com/file/17np8s

gonetz commented 9 years ago

I guess I found how it works: manipulation with texture format again. Auxiliary buffer has format 8bit intensity, but when game uses it as texture, texture loaded as 8bit intensity-alpha. Alpha makes the shadow translucent. I simulated this in shaders, but the shadow has strange boarder. gliden64_turok_3 _shadow_of_o_006

Predator82Germany commented 9 years ago

& too dark

gonetz commented 9 years ago

Wrong intensity is a minor defect.

AmbientMalice commented 9 years ago

Does anti-aliasing have any effect on the softer shadows?

gonetz commented 9 years ago

No. I think, the shadow intentionally made "hairy". It looks like this with software lle too. Dark bound problem is probably solved by proper pixel coverage emulation, which is not implemented in GLideN64. I can't explain though, why shadow itself is darker than with soft lle.

AmbientMalice commented 9 years ago

Been testing https://github.com/gonetz/GLideN64/commit/d5a0f20098b838266485d211a5781e01a18dfec1

Glide64: glide64_jet_force_gemini_01

GLideN64: gliden64_jet_force_gemini_001

Angrylion's: njfe0000

I'm not sure this half-fix was a good idea because it makes games that use this shadow method look really, really ugly. Even the inaccurate hard black shadows are, IMO, preferable to these harsh black fuzzing things.

gonetz commented 9 years ago

I reverted my fix. Need to find another solution.

olivieryuyu commented 3 years ago

GLideN64_JET_FORCE_GEMINI_001

seems fixed