<commit_before>varying	vec3 colorYxy;
varying vec3 skyVec;
varying	vec4 McPosition;
varying	float lv;
uniform	vec4  sunPos;

uniform samplerCube texCube;

vec4 	eyePos   = vec4(0.0, 0.0, 0.0, 1.0);
float	colorExp = 8.0;

vec3 convertColor (){
    vec3 clrYxy = vec3 ( colorYxy );
    clrYxy [0] = 1.0 - exp ( -clrYxy [0] / colorExp );

    float	ratio    = clrYxy [0] / clrYxy [2];	

    vec3	XYZ;

    XYZ.x = clrYxy [1] * ratio;					// X = x * ratio
    XYZ.y = clrYxy [0];							// Y = Y
    XYZ.z = ratio - XYZ.x - XYZ.y;				// Z = ratio - X - Y

    const vec3 rCoeffs = vec3 ( 3.240479, -1.53715, -0.49853  );
    const vec3 gCoeffs = vec3 ( -0.969256, 1.875991, 0.041556 );
    const vec3 bCoeffs = vec3 ( 0.055684, -0.204043, 1.057311 );

    return vec3 ( dot ( rCoeffs, XYZ ), dot ( gCoeffs, XYZ ), dot ( bCoeffs, XYZ ));
}<commit_msg>- Addresses #115 - Maybe the cause was a possible division by zero handled differently by some GPUs?<commit_after>varying	vec3 colorYxy;
varying vec3 skyVec;
varying	vec4 McPosition;
varying	float lv;
uniform	vec4  sunPos;

uniform samplerCube texCube;

vec4 	eyePos   = vec4(0.0, 0.0, 0.0, 1.0);
float	colorExp = 8.0;

vec3 convertColor() {
    if (colorYxy == vec3(0.0, 0.0, 0.0))
        return vec3(0.0, 0.0, 0.0);

    vec3 clrYxy = vec3(colorYxy);
    clrYxy.x = 1.0 - exp ( -clrYxy.x / colorExp );

    float	ratio    = clrYxy.x / clrYxy.z;

    vec3	XYZ;

    XYZ.x = clrYxy.y * ratio;					// X = x * ratio
    XYZ.y = clrYxy.x;							// Y = Y
    XYZ.z = ratio - XYZ.x - XYZ.y;				// Z = ratio - X - Y

    const vec3 rCoeffs = vec3 ( 3.240479, -1.53715, -0.49853  );
    const vec3 gCoeffs = vec3 ( -0.969256, 1.875991, 0.041556 );
    const vec3 bCoeffs = vec3 ( 0.055684, -0.204043, 1.057311 );

    return vec3 ( dot ( rCoeffs, XYZ ), dot ( gCoeffs, XYZ ), dot ( bCoeffs, XYZ ));
}
{'fraction_non_alphanumeric': 0.14627514953779228, 'fraction_numerical': 0.11038607939097335, 'mean_word_length': 2.3034111310592458, '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': '4033802', 'n_tokens_mistral': 993, 'n_tokens_neox': 847, 'n_words': 218}