by phantombeta » Fri Dec 04, 2020 9:14 am
I'm pretty sure the bigger challenge here would be the
states part, not rendering.
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 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.
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.
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.
That can easily be done on the GPU itself, though.
I'm pretty sure the bigger challenge here would be the [i]states[/i] part, not rendering.
[quote="Rachael"]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.[/quote]
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.
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.
[quote]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.[/quote]
That can easily be done on the GPU itself, though.