<commit_before><Node>
    <ID>Falloff Map</ID>
    <Category>Environment/Custom/</Category>
    <Cost>0.01</Cost>
    <CostDescription>Some calculations</CostDescription>
    <Attributes>
        <Attribute Name="FrontColor" PrettyName="Front Color" Group="Falloff Parameters" Type="color" Description="Defines the color of the Normals that are facing the camera">(0.0,0.0,0.0,1)</Attribute>
        <Attribute Name="SideColor" PrettyName="Side Color" Group="Falloff Parameters" Type="color" Description="Defines the color of the Normals that are look at 90º in relation to the viewing angle">(1.0,1.0,1.0,1)</Attribute>
        <Attribute Name="FalloffStart" PrettyName="Falloff Start" Group="Falloff Parameters" Type="double" Description="Adjust where the falloff start. 1 it makes starts where the normals face the camera, while 0 means towards the edge." Min="0" Max="1">0</Attribute>
        <Attribute Name="FalloffEnd" PrettyName="Falloff End" Group="Falloff Parameters" Type="double" Description="Adjust where the falloff end. 1 it makes starts where the normals face the camera, while 0 means towards the edge." Min="0" Max="1">1</Attribute>
        <Attribute Name="FalloffType" PrettyName="Falloff Type" Group="Falloff Parameters" Type="userenum" Description="Chooses the kind of falloff. This are based on 3DS Max Falloff Map node.">0, 0,1,2, Facing Ratio, Shadow/Light, Distance Blend</Attribute>
    </Attributes>
    <Tags>
        <Tag>_notcacheable</Tag>
        <Tag>_notbakeable</Tag>
    </Tags>
    <Contexts>
        <Context Type='NodeGraphView'>
        </Context>
            <Context Type='GLSL'>
            <Shader ShaderType='Fragment'>
                <Body>
                <![CDATA[

                vec4 Blend  = vec4 (0.0);

                // Facing Ratio Mode
                if ($FalloffType == 0)
                {
                    float VdotN = dot(State.ViewVectorInEyeSpaceFromViewCamera, State.NormalInEyeSpaceFromViewCamera);
                    float Fresnel = clamp((abs(VdotN) - $FalloffStart) / ($FalloffEnd - $FalloffStart), 0.0, 1.0);
                    Blend  = mix($FrontColor, $SideColor, 1-Fresnel);
                    if ($FalloffStart > 0.5)
                    {
                        Blend = ($FalloffStart == $FalloffEnd) ? $SideColor : mix($FrontColor, $SideColor, 1-Fresnel);
                    }
                    if ($FalloffStart < 0.5)
                    {<commit_msg>Stabilized Projection Baking for parts of Falloff Map<commit_after><Node>
    <ID>Falloff Map</ID>
    <Category>Environment/Custom/</Category>
    <Cost>0.01</Cost>
    <CostDescription>Some calculations</CostDescription>
    <Attributes>
        <Attribute Name="FrontColor" PrettyName="Front Color" Group="Falloff Parameters" Type="color" Description="Defines the color of the Normals that are facing the camera">(0.0,0.0,0.0,1)</Attribute>
        <Attribute Name="SideColor" PrettyName="Side Color" Group="Falloff Parameters" Type="color" Description="Defines the color of the Normals that are look at 90º in relation to the viewing angle">(1.0,1.0,1.0,1)</Attribute>
        <Attribute Name="FalloffStart" PrettyName="Falloff Start" Group="Falloff Parameters" Type="double" Description="Adjust where the falloff start. 1 it makes starts where the normals face the camera, while 0 means towards the edge." Min="0" Max="1">0</Attribute>
        <Attribute Name="FalloffEnd" PrettyName="Falloff End" Group="Falloff Parameters" Type="double" Description="Adjust where the falloff end. 1 it makes starts where the normals face the camera, while 0 means towards the edge." Min="0" Max="1">1</Attribute>
        <Attribute Name="FalloffType" PrettyName="Falloff Type" Group="Falloff Parameters" Type="userenum" Description="Chooses the kind of falloff. This are based on 3DS Max Falloff Map node.">0, 0,1,2, Facing Ratio, Shadow/Light, Distance Blend</Attribute>
    </Attributes>
    <Tags>
        <Tag>_notcacheable</Tag>
        <Tag>_notbakeable</Tag>
    </Tags>
    <Contexts>
        <Context Type='NodeGraphView'>
        </Context>
            <Context Type='GLSL'>
            <Shader ShaderType='Fragment'>
                <Body>
                <![CDATA[

                vec4 Blend  = vec4 (0.0);

                // Facing Ratio Mode
                if ($FalloffType == 0)
                {
                    float VdotN = dot(State.ViewVectorInEyeSpaceFromProjectionCamera, State.NormalInEyeSpaceFromProjectionCamera);
                    float Fresnel = clamp((abs(VdotN) - $FalloffStart) / ($FalloffEnd - $FalloffStart), 0.0, 1.0);
                    Blend  = mix($FrontColor, $SideColor, 1-Fresnel);
                    if ($FalloffStart > 0.5)
                    {
                        Blend = ($FalloffStart == $FalloffEnd) ? $SideColor : mix($FrontColor, $SideColor, 1-Fresnel);
                    }
                    if ($FalloffStart < 0.5)
                    {
{'fraction_non_alphanumeric': 0.12029161603888214, 'fraction_numerical': 0.019846091535034426, 'mean_word_length': 2.6693907875185734, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 71, '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': '4624179', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1366, 'n_words': 389}