Allow RenderUnderlay to draw under psprites

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Allow RenderUnderlay to draw under psprites

Postby kodi » Mon Apr 20, 2020 2:49 pm

I would like if there was a way for RenderUnderlay to draw stuff under the weapon and other psprites. My use case is a bunch of scripted lightning bolt effects issuing from a weapon. Other potential uses cases could be drawing projected highlights, boundaries and bars over actors and level geometry, or for drawing of certain special effects in screen space.
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013

Re: Allow RenderUnderlay to draw under psprites

Postby Major Cooke » Mon Apr 20, 2020 5:29 pm

It would be better to introduce a new function in this case that's beneath it all. But sure, I actually like this idea. I'll get on it.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Allow RenderUnderlay to draw under psprites

Postby kodi » Tue Apr 21, 2020 9:00 am

That's awesome! :wub:
I wish you luck!
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013

Re: Allow RenderUnderlay to draw under psprites

Postby Major Cooke » Tue Apr 21, 2020 9:52 pm

Bad news. This isn't exactly possible right now due to some limitations.

For starters, weapon drawing is done differently between software and hardware (OpenGL) renderer, and is done before any of the 2D drawing for ZScript is allowed. Weapon sprite drawing is also done based on conditions, especially for the OpenGL renderer and called at various times, so it seems. I could be wrong there, but assuming its true, this makes it impossible to create a function that could be used to call it when allowed instead.

Correct me if I'm wrong on any of that, Graf.

Marisa Kirisame said a long time ago she wanted to work on adding rolling and scaling to PSprites but that seems unlikely to come anytime soon.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest