Pitch + Angle Based Sprite Masking

Moderator: GZDoom Developers

User avatar
Major Cooke
Posts: 8206
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: Pitch + Angle Based Sprite Masking

Post by Major Cooke »

Done. New pull request issued due to merge conflict, so that's fixed as well.

Code: Select all

VisibleAngles 0, 90
VisiblePitch 0, -20
Anything else, or still waiting on more feedback?
User avatar
Major Cooke
Posts: 8206
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: Pitch + Angle Based Sprite Masking

Post by Major Cooke »

Updated once again for the latest series of changes.

Is there anything else?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Pitch + Angle Based Sprite Masking

Post by Graf Zahl »

No idea. As you may see I have been extremely busy the last week so I haven't taken a closer look at this code.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Pitch + Angle Based Sprite Masking

Post by Graf Zahl »

One note about the pull request: Unless you change the handler for some property you should not bump savegame versions anymore, i.e. only change it if you need to add some 'if (SaveVersion >/< xxx)' to implement it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Pitch + Angle Based Sprite Masking

Post by Graf Zahl »

So what's the reason for this:

Code: Select all

	player_t* pPlayer = players[consoleplayer].camera->player;

	if (pPlayer && pPlayer->mo)
You are essentially disabling the feature for non-player cameras entirely. You alre also not comparing the angle toward the actual camera but to the player actor attached to the camera, which is not necessarily the same. Why do you require

players[consoleplayer].camera->player->mo

and not just

players[consoleplayer].camera

?

Last but not least - this does not consider chasecam etc. Since this is a RENDERER feature you cannot do comparisons against PLAYSIM values, you have to use the renderer's ViewPos to determine where the camera is, not the camera actor's position.
Too bad I only noticed this after committing, it should be easy to fix, though.
User avatar
Major Cooke
Posts: 8206
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: [Needs Dev Reviewing]Pitch + Angle Based Sprite Masking

Post by Major Cooke »

Couple other bug fixes I'll need to put in too which were slightly overlooked. I'll host them in a new bug thread.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Pitch + Angle Based Sprite Masking

Post by Graf Zahl »

I'm sorry but that's still not correct. You have to be very careful here with portals. There is no guarantee that your calculations end up in the same portal group. 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.
User avatar
Major Cooke
Posts: 8206
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: Pitch + Angle Based Sprite Masking

Post by Major Cooke »

Got it all fixed for ya. You actually don't need to do anything else, it appears.

Yeah I meant to say that first PR was just for seeing how I was doing, and I had run into a little snag. However, I figured out how to fix it all and I even tested it with Arookas' map.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: Pitch + Angle Based Sprite Masking

Post by Edward-san »

Your buggy version of AActor::IsInsideVisibleAngles managed to trigger an llvm backend internal error when trying to compile release mode with clang, then it stopped with your latest fixes. :shrug:
User avatar
Major Cooke
Posts: 8206
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: Pitch + Angle Based Sprite Masking

Post by Major Cooke »

So I don't need to worry about it then?
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: Pitch + Angle Based Sprite Masking

Post by Edward-san »

You don't, indeed.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”