<commit_before>// Copyright © <NAME> and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

#include "SmokeTypes.hlsl"

Texture3D textureInput : register(t0);
SamplerState samplerInput : register(s0);

float4 main(PSInput input) : SV_Target
{
    float r = 0;
    float g = 0;
    float b = 0;
    float a = 0;
    for (int i = 0; i < 100; i++)
    {
        // get and apply the gray level intensitiy from the single value float texture
        float3 uvw = float3(input.uvw[0], input.uvw[1], (input.uvw[2] + i * 0.01) % 1.0);
        float4 texel = textureInput.Sample(samplerInput, uvw);
        float4 color = texel[0] * float4(1, 1, 1, 1);
        float4 scale = clamp(input.scale, 0, 1); // hack to make limit the ugliness of the unexpectedly large incoming scale values
        color = color * scale * scale * 0.5;
        r = r * a + color[0] * (1 - a);
        g = g * a + color[1] * (1 - a);
        b = b * a + color[2] * (1 - a);
        a = 1 - (1 - a) * (1 - color[3]);
    }
    float4 accumulatedColor = float4(r,g,b,a);
    return accumulatedColor;
}<commit_msg>PixelShader clamp removed since scale is now coming in with the range as intended<commit_after>// Copyright © <NAME> and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

#include "SmokeTypes.hlsl"

Texture3D textureInput : register(t0);
SamplerState samplerInput : register(s0);

float4 main(PSInput input) : SV_Target
{
    float r = 0;
    float g = 0;
    float b = 0;
    float a = 0;
    for (int i = 0; i < 100; i++)
    {
        // get and apply the gray level intensitiy from the single value float texture
        float3 uvw = float3(input.uvw[0], input.uvw[1], (input.uvw[2] + i * 0.01) % 1.0);
        float4 texel = textureInput.Sample(samplerInput, uvw);
        float4 color = texel[0] * float4(1, 1, 1, 1);
        float4 scale = input.scale;
        color = color * scale * scale * 0.5;
        r = r * a + color[0] * (1 - a);
        g = g * a + color[1] * (1 - a);
        b = b * a + color[2] * (1 - a);
        a = 1 - (1 - a) * (1 - color[3]);
    }
    float4 accumulatedColor = float4(r,g,b,a);
    return accumulatedColor;
}
{'fraction_non_alphanumeric': 0.13398402839396628, 'fraction_numerical': 0.04081632653061224, 'mean_word_length': 2.4692307692307693, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5443407', 'n_tokens_mistral': 818, 'n_tokens_neox': 770, 'n_words': 270}