You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sprites and entity icons should be rendered using the full range of their alpha channel.
This would allow for nicer icons and proper preview of GoldSrc sprites.
Steps to Reproduce
Display an image with 8-bit transparency using model(). Unzip valve_addon.zip in your Half-Life folder for a quick repro.
Here's the original image for the repro above, its alpha channel is a linear vertical gradient from white to black:
Here's how it looks in TrenchBroom:
It's cut below alpha .5. I suspect this bit from the fragment shader to be the culprit:
// Assume alpha masked or opaque.// TODO: Make this optional if we gain support for translucent texturesif (EnableMasked &&gl_FragColor.a <0.5) {
discard;
}
This also affects GoldSrc Additive and IndexAlpha sprites.
The text was updated successfully, but these errors were encountered:
This also affects GoldSrc Additive and IndexAlpha sprites.
The additive rendermode in the SPR isn't actually used by the engine (both opaque and additive act the same); instead any SPR or MDL can be made additive (via KV) regardless of what mode is set. GoldSrc's additive translucency for SPRs is better handled with a new alphamode parameter in model({}) (after OP's issue is resolved).
In fact, it seems SpriteMaker makes sprites as additive by default, since they're basically the same.
System Information
TrenchBroom 2023.1 Build v2023.1-472-g94049d6d2 Debug Linux-
Expected Behavior
Sprites and entity icons should be rendered using the full range of their alpha channel.
This would allow for nicer icons and proper preview of GoldSrc sprites.
Steps to Reproduce
Display an image with 8-bit transparency using
model()
. Unzip valve_addon.zip in your Half-Life folder for a quick repro.Here's the original image for the repro above, its alpha channel is a linear vertical gradient from white to black:
Here's how it looks in TrenchBroom:
It's cut below alpha .5. I suspect this bit from the fragment shader to be the culprit:
This also affects GoldSrc Additive and IndexAlpha sprites.
The text was updated successfully, but these errors were encountered: