Renderstyle woe

Bugs that have been investigated and resolved somehow.

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.
Post Reply
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Renderstyle woe

Post by Blue Shadow »

Tested with: In the attached file below, there is a simple actor with renderstyle translucent, which calls an ACS script that is supposed to change its renderstyle from translucent to stencil and back to translucent. Here is the script:

Code: Select all

Script "ChangeRStyle" (void)
{
  int rstyle = GetActorProperty(0, APROP_RenderStyle);

  If(rstyle == STYLE_Translucent) SetActorProperty(0, APROP_RenderStyle, STYLE_Stencil);
  Else SetActorProperty(0, APROP_RenderStyle, STYLE_Translucent);
}
However, when tested in game, the actor changes from its preset renderstyle (translucent) to what I think is shaded, and then to stencil.

My only guess is that something probably went wrong here.
rstyle_issue.zip
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: Renderstyle woe

Post by Blue Shadow »

I think I've found the culprit: the styles' ordering between LegacyRenderStyleIndices array and ERenderStyle enum doesn't match, which SetActorProperty appears to rely on when setting the appropriate renderstyle.


That or I have no idea what I'm talking about. Although, I ran the same test file above with a custom build I compiled which fixes the ordering, and it seems to produce correct results.
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Renderstyle woe

Post by edward850 »

You pretty much hit the nail on the head, there.
Blzut3
 
 
Posts: 3202
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Renderstyle woe

Post by Blzut3 »

Fixed.
Post Reply

Return to “Closed Bugs [GZDoom]”