I only just got the Medusa bug fixed in my sourceport and it involved transplanting code from R_DrawVisSprite (in r_things) into R_RenderMaskedSegRange (in r_segs). Then I had to work out how the heck patches worked. After a lot of trial-and-error, including several mistakes when I was using the wrong structure (e.g. originx/originy good, leftoffset/topoffset bad), I am now at a loss as to why allowing one to superimpose one patch over another was even remotely considered a good idea. (Allowing one to mix and match columns is fine, but having 2+ patches per column was a mistake.)
At some point I'd like to rework this so that R_GetColumn (in r_data) returns a chain of column_t blocks and then everything will be able to do stuff The Right Way™, but I have other, less sanity-draining things I want to do with this engine first.
How did people fix this bug in their engines? I'd imagine for OpenGL one would ensure that R_GenerateComposite (in r_data) could generate transparent textures and then base all the texture handling off that, but that's really only how I'd do it and at the moment I'm sticking to software rendering.
How did engine programmers fix the Medusa effect?
-
- Posts: 7
- Joined: Thu Oct 26, 2023 1:45 am
- Operating System Version (Optional): Artix Linux
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
-
- Lead GZDoom+Raze Developer
- Posts: 49188
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: How did engine programmers fix the Medusa effect?
Boom changed the code to build a proper column list for everything and virtually everybody copied that.
For hardware rendering you normally do not use the software renderer's functions but roll out your own one that can properly deal with copying textures with transparent parts into a buffer.
For hardware rendering you normally do not use the software renderer's functions but roll out your own one that can properly deal with copying textures with transparent parts into a buffer.
-
- Posts: 7
- Joined: Thu Oct 26, 2023 1:45 am
- Operating System Version (Optional): Artix Linux
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: How did engine programmers fix the Medusa effect?
Huh. That makes a lot of sense. Probably also explains why "Boom-compatibility" is so common - you can start with all the bugs, or you can start with Boom...