<commit_before>#extension GL_ARB_texture_rectangle : enable
varying vec4 pos;
uniform sampler2DRect backface;
uniform sampler3D volume_tex;
uniform vec3 vol_d;
uniform vec2 bg_d;
uniform float zoffset;
uniform float quality;
uniform float threshold;
uniform float density;

const vec3 minv = vec3(0.,0.,0.);
const vec3 maxv = vec3(1.,1.,1.);

void main()
{
    vec4 col_acc = vec4(0,0,0,0);
    vec3 vec = clamp(vec3(gl_TexCoord[0]), minv, maxv); // starting position of the ray
    vec3 zOffsetVec = vec3(0.0,0.0,zoffset/vol_d.z);
    vec3 dir = clamp(vec3(texture2DRect(backface, (((pos.xy / pos.w)+1.) / 2.)*bg_d)), minv,maxv) - vec; //direction = backface - starting position

    if(length(dir) > 0.) {
        float steps = floor(length(vol_d * dir) * quality);
        float stepsize = length(dir.xyz) / steps;
        vec3 delta_dir = normalize(dir) * stepsize;
        vec4 color_sample;
        float aScale =  density * (1.0/quality);
<commit_msg>fixed ugly texure wrapping when using GL_LINEAR texture filter<commit_after>#extension GL_ARB_texture_rectangle : enable
varying vec4 pos;
uniform sampler2DRect backface;
uniform sampler3D volume_tex;
uniform vec3 vol_d;
uniform vec2 bg_d;
uniform float zoffset;
uniform float quality;
uniform float threshold;
uniform float density;

void main()
{
    vec3 minv = 1./vol_d;//vec3(0.,0.,0.);
    vec3 maxv = vec3(1.,1.,1.) - minv;

    vec4 col_acc = vec4(0,0,0,0);
    vec3 vec = clamp(vec3(gl_TexCoord[0]), minv, maxv); // starting position of the ray
    vec3 zOffsetVec = vec3(0.0,0.0,zoffset/vol_d.z);
    vec3 dir = clamp(vec3(texture2DRect(backface, (((pos.xy / pos.w)+1.) / 2.)*bg_d)), minv,maxv) - vec; //direction = backface - starting position

    if(length(dir) > 0.) {
        float steps = floor(length(vol_d * dir) * quality);
        float stepsize = length(dir.xyz) / steps;
        vec3 delta_dir = normalize(dir) * stepsize;
        vec4 color_sample;
        float aScale =  density * (1.0/quality);

{'fraction_non_alphanumeric': 0.13239009600808488, 'fraction_numerical': 0.040929762506316324, 'mean_word_length': 3.5833333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?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': '340625', 'n_tokens_mistral': 729, 'n_tokens_neox': 708, 'n_words': 185}