Sprite Clipping Adjustment

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
NeuralStunner
Heresy!
Posts: 253
Joined: Tue Dec 29, 2009 3:46
Location: IN SPACE
Contact:

Sprite Clipping Adjustment

Post by NeuralStunner » Mon Jul 23, 2012 20:18

So I have a few questions about this feature:
  • What's the difference between "Smart" and "Smarter"?
  • How do GL_SClipFactor and GL_SClipThreshold work?
  • When sprites are aligned to the floor (Y offset == height), "Always" still adjusts them upward by one "virtual pixel". Is this a simple inaccuracy that could be fixed?
  • Would it be possible/acceptable to turn off adjustment on a per-mod basis through MapInfo? When I work with sprites I typically offset them above-floor. In a few cases (such as explosions) I can still see the sprites get "jumpy" when near the floor. Much like lighting mode, it would be nice if I could choose the best-looking method without requiring the user to change their settings.
Dean Koontz wrote:Human beings can always be relied upon to exert, with vigor, their God-given right to be stupid.
Spoiler: System Specs

Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Sprite Clipping Adjustment

Post by Gez » Mon Jul 23, 2012 22:51

The "smart" setting only affects players, monsters, and pickups.

The "smarter" setting potentially affects everything, but that depends on how much of the sprite's height is clipped without adjustment. For example, very small decorations like pools of blood are only visible with "always" or "smarter", with "never" or "smart" they get hidden by the floor. Smarter clipping doesn't necessarily offset by the amount of pixels that are lost, either: the taller the object is, the lesser the adjustment. This is to avoid the "torches hovering above the ground" effect you get with "always" adjustment. Finally, "smarter" clipping is the only one that will adjust for sprites that are clipped by the ceiling, such as Strife's water drip.

gl_sclipthreshold is used as a "safety value" above which clipping adjustment is nulled, because it is deemed too large to possibly be correct. The default value is 10 texels.

gl_sclipfactor is the value used by smarter clip to adjust the adjustment. It only really matters for small sprites that clip a lot.

Locked

Return to “GZDoom”