Monster Overlays
Moderator: GZDoom Developers
-
- Posts: 3428
- Joined: Sun Oct 19, 2014 6:45 pm
- Location: Plahnit Urff
Monster Overlays
I propose a change that'll allow overlays for other non-player/weapon actors as well, allowing multiple sprite layers to be rendered in the world for the same actor (higher value overlays are placed over lower-value overlays, like with A_Overlay). One such place it could be used is with depicting battle damage on a monster as it's being torn apart by a hail of bullets.
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Monster Overlays
Heh, this could be nice to get rid of the hacks I use to have models with different per-part render styles. I like it.
-
- Posts: 8111
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Monster Overlays
I wonder how hard this would be to make. It'd be very nice to have, I agree.
-
- Posts: 13299
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Monster Overlays
A lot less simple than screen overlays, since world drawing has to respect Z-space.Major Cooke wrote:I wonder how hard this would be to make. It'd be very nice to have, I agree.
A little "hack" would be to smidge the higher overlays in front of the back ones, but that might be observable, the sprite clipping would be a bit weird on the walls even if you used perspective math to correct it, and it also does not guarantee that you'll be able to avoid Z-fighting at any sort of distance.
Not saying it's impossible - just that any implementation that runs on the hardware renderer would probably be glitchy.
Unless, of course, the texture was composited before it was sent to the renderer - which would simply slow down rendering, especially if a lot of such sprites were shown in the scene.
-
-
- Posts: 17777
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Monster Overlays
Reminds me of this. Spoiler warning: it was noed.
-
- Posts: 2051
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Monster Overlays
I'm pretty sure the bigger challenge here would be the states part, not rendering.
I'm also pretty sure GZDoom disables Z-writes for drawing sprites, as that would have pretty bad results... So the only thing that determines the rendering order for them is the order they're drawn in, and as such, they can't get Z fighting between each other.
[Edit] Just checked and yep. Depth test enabled, depth write disabled.
I don't think this is a problem at all. Last I checked, sprites can already be in the same exact (GZDoom) XYZ coords without glitching out.Rachael wrote:A little "hack" would be to smidge the higher overlays in front of the back ones, but that might be observable, the sprite clipping would be a bit weird on the walls even if you used perspective math to correct it, and it also does not guarantee that you'll be able to avoid Z-fighting at any sort of distance.
Not saying it's impossible - just that any implementation that runs on the hardware renderer would probably be glitchy.
I'm also pretty sure GZDoom disables Z-writes for drawing sprites, as that would have pretty bad results... So the only thing that determines the rendering order for them is the order they're drawn in, and as such, they can't get Z fighting between each other.
[Edit] Just checked and yep. Depth test enabled, depth write disabled.
That can easily be done on the GPU itself, though.Unless, of course, the texture was composited before it was sent to the renderer - which would simply slow down rendering, especially if a lot of such sprites were shown in the scene.
-
- Posts: 439
- Joined: Fri Oct 14, 2005 2:21 pm
Re: Monster Overlays
I like this idea a lot.