Pull Request
Alright, this works much better.
So it turns out using Normalized180() was actually a pretty bad idea. Removed that.
Now using just the camera instead of camera->player->mo.
And now using ViewPos.
Also fixed an issue where the property wasn't working correctly.
Visibility Rendering Fixes
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Visibility Rendering Fixes
Last edited by Major Cooke on Sat Sep 24, 2016 9:41 am, edited 1 time in total.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Visibility Rendering Fixes
I just did some testing with Arookas' portal map. Seems to be working so far.Graf Zahl wrote:I had a quick look and it seems that the needed info is currently not stored globally. I'll have to think about it a bit.
- Attachments
-
test.pk3
- Summon A under the portal.
- (7.27 KiB) Downloaded 36 times
-
portals.wad
- (49.7 KiB) Downloaded 36 times
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Visibility Rendering Fixes
There may be one edge case where this may not work as-is, and that's when a sprite is being split across a portal boundary in GZDoom. If you process the part of the other side of the portal, Pos() may not be what this code expects.
I merged it anyway because it's better than the old version.
I merged it anyway because it's better than the old version.
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Visibility Rendering Fixes
Yeah, I'd rather get that crap fixed ASAP than wait. Thanks.
I can take a look into GZDoom-specific version now if you wish.
I can take a look into GZDoom-specific version now if you wish.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Visibility Rendering Fixes
If you want to do it, great. I'm a bit exhausted after the savegame stuff and right now do not feel motivated...
- Major Cooke
- Posts: 8209
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Visibility Rendering Fixes
Did some more testing with it, it appears to be working just fine so far with portals. Stuck a couple sprites exactly in the middle of the line.
The only thing that didn't really work was flat sprites when on the same side of the portal as the flat sprite itself.
The only thing that didn't really work was flat sprites when on the same side of the portal as the flat sprite itself.
Spoiler: PicThat's the only bug I encountered, but otherwise the visibility changing based on relative angle worked out perfectly.
Spoiler: PicEven with flat sprites off it appeared fine.