<commit_before>#import "Common/ShaderLib/MultiSample.glsllib"
 
uniform COLORTEXTURE m_Texture;
in vec2 texCoord;
 
uniform vec4 m_LineColor;
uniform vec4 m_PaperColor;
uniform float m_ColorInfluenceLine;
uniform float m_ColorInfluencePaper;
 
uniform float m_FillValue;
uniform float m_Luminance1;
uniform float m_Luminance2;
uniform float m_Luminance3;
uniform float m_Luminance4;
uniform float m_Luminance5;
 
uniform int m_LineDistance;
uniform int m_LineThickness;
 
void main() {
    vec4 texVal = getColor(m_Texture, texCoord);
    float linePixel = 0;
 
    float lum = texVal.r*0.2126 + texVal.g*0.7152 + texVal.b*0.0722;
 
    if (lum < m_Luminance1){
        if (mod(gl_FragCoord.x + gl_FragCoord.y, m_LineDistance * 2) < m_LineThickness)
            linePixel = 1;
    }
    if (lum < m_Luminance2){
        if (mod(gl_FragCoord.x - gl_FragCoord.y, m_LineDistance * 2) < m_LineThickness)
            linePixel = 1;
    }
    if (lum < m_Luminance3){
        if (mod(gl_FragCoord.x + gl_FragCoord.y - m_LineDistance, m_LineDistance) < m_LineThickness)
            linePixel = 1;
    }
    if (lum < m_Luminance4){
        if (mod(gl_FragCoord.x - gl_FragCoord.y - m_LineDistance, m_LineDistance) < m_LineThickness)
            linePixel = 1;
    }
    if (lum < m_Luminance5){ // No line, make a blob instead
        linePixel = m_FillValue;
    }
 
    // Mix line color with existing color information
    vec4 lineColor = mix(m_LineColor, texVal, m_ColorInfluenceLine);
    // Mix paper color with existing color information
    vec4 paperColor = mix(m_PaperColor, texVal, m_ColorInfluencePaper);
 
    gl_FragColor = mix(paperColor, lineColor, linePixel);
}<commit_msg> * CrossHatch filter should now properly compile on ATI<commit_after>#import "Common/ShaderLib/MultiSample.glsllib"
 
uniform COLORTEXTURE m_Texture;
in vec2 texCoord;
 
uniform vec4 m_LineColor;
uniform vec4 m_PaperColor;
uniform float m_ColorInfluenceLine;
uniform float m_ColorInfluencePaper;
 
uniform float m_FillValue;
uniform float m_Luminance1;
uniform float m_Luminance2;
uniform float m_Luminance3;
uniform float m_Luminance4;
uniform float m_Luminance5;
 
uniform float m_LineDistance;
uniform float m_LineThickness;
 
void main() {
    vec4 texVal = getColor(m_Texture, texCoord);
    float linePixel = 0;
 
    float lum = texVal.r*0.2126 + texVal.g*0.7152 + texVal.b*0.0722;
 
    if (lum < m_Luminance1){
        if (mod(gl_FragCoord.x + gl_FragCoord.y, m_LineDistance * 2.0) < m_LineThickness)
            linePixel = 1;
    }
    if (lum < m_Luminance2){
        if (mod(gl_FragCoord.x - gl_FragCoord.y, m_LineDistance * 2.0) < m_LineThickness)
            linePixel = 1;
    }
    if (lum < m_Luminance3){
        if (mod(gl_FragCoord.x + gl_FragCoord.y - m_LineDistance, m_LineDistance) < m_LineThickness)
            linePixel = 1;
    }
    if (lum < m_Luminance4){
        if (mod(gl_FragCoord.x - gl_FragCoord.y - m_LineDistance, m_LineDistance) < m_LineThickness)
            linePixel = 1;
    }
    if (lum < m_Luminance5){ // No line, make a blob instead
        linePixel = m_FillValue;
    }
 
    // Mix line color with existing color information
    vec4 lineColor = mix(m_LineColor, texVal, m_ColorInfluenceLine);
    // Mix paper color with existing color information
    vec4 paperColor = mix(m_PaperColor, texVal, m_ColorInfluencePaper);
 
    gl_FragColor = mix(paperColor, lineColor, linePixel);
}
{'fraction_non_alphanumeric': 0.08432708688245315, 'fraction_numerical': 0.022146507666098807, 'mean_word_length': 2.976297968397291, 'pattern_counts': {'":': 0, '<': 21, '<?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': '825355', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1242, 'n_words': 290}