<commit_before>#ifndef PSBILLBOARDTEXT_HLSL
#define PSBILLBOARDTEXT_HLSL
#define POINTLINE
#include"..\Common\DataStructs.hlsl"
#include"..\Common\Common.hlsl"

static const uint BillboardSingleText = 1;
static const uint BillboardMultiText = 2;
static const uint BillboardImage = 4;

float4 main(PSInputBT input) : SV_Target
{
	// Take the color off the texture, and use its red component as alpha.
    float4 pixelColor = billboardTexture.Sample(samplerBillboard, input.t);
    float4 blend = input.foreground * pixelColor.x + input.background * (1 - pixelColor.x);

    return blend * whengt((when_eq(BillboardMultiText, (int) pfParams.x) + when_eq(BillboardSingleText, (int) pfParams.x)), 0)
    + pixelColor * any(when_neq(pixelColor, input.background)) * when_eq(BillboardImage, (int) pfParams.x);
}

#endif<commit_msg>Discard the pixel if it is alpha = 0 for billboards<commit_after>#ifndef PSBILLBOARDTEXT_HLSL
#define PSBILLBOARDTEXT_HLSL
#define POINTLINE
#include"..\Common\DataStructs.hlsl"
#include"..\Common\Common.hlsl"

static const uint BillboardSingleText = 1;
static const uint BillboardMultiText = 2;
static const uint BillboardImage = 4;

float4 main(PSInputBT input) : SV_Target
{
	// Take the color off the texture, and use its red component as alpha.
    float4 pixelColor = billboardTexture.Sample(samplerBillboard, input.t);
    float4 blend = input.foreground * pixelColor.r + input.background * (1 - pixelColor.r);

    float4 color = blend * whengt((when_eq(BillboardMultiText, (int) pfParams.x) + when_eq(BillboardSingleText, (int) pfParams.x)), 0)
    + pixelColor * any(when_neq(pixelColor, input.background)) * when_eq(BillboardImage, (int) pfParams.x);
    if (color.a == 0)
    {
        discard;
    }
    return color;
}

#endif
{'fraction_non_alphanumeric': 0.11048158640226628, 'fraction_numerical': 0.01076487252124646, 'mean_word_length': 4.7901639344262295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7058915', 'n_tokens_mistral': 592, 'n_tokens_neox': 577, 'n_words': 149}