<commit_before>#version 410

in vec3 fPosition;
in vec2 fTexCoord;
in vec3 fNormal;
in vec3 fTangent;
in vec3 fBitangent;

uniform sampler2D DiffuseTexture;
uniform sampler2D SpecularTexture;
uniform sampler2D NormalTexture;

out vec4 FragColor;

uniform mat4 WorldModel;
uniform vec3 CameraPosition;
uniform int IlluminationModel;

void main()
{
    vec3 worldLightPosition = vec3(500, 400, 0);
    vec3 modelLightPosition = (WorldModel * vec4(worldLightPosition, 1)).xyz;
    
    vec3 modelCameraPos = (WorldModel * vec4(CameraPosition, 1)).xyz;

    vec3 modelPosition = fPosition;
    vec3 L = normalize(modelLightPosition - modelPosition); // light direction
    vec3 V = normalize(modelCameraPos - modelPosition); // towards viewer

    if (IlluminationModel == 1) // standard opaque material
    {
        vec4 diffuseMap = texture(DiffuseTexture, fTexCoord);
        vec4 specularMap = texture(SpecularTexture, fTexCoord);

        vec3 normalMap = normalize(texture(NormalTexture, fTexCoord).rgb);
        vec3 tangent = normalize(fTangent);
        vec3 bitangent = normalize(fBitangent);
        vec3 normal = normalize(fNormal);
        if (dot(cross(normal, tangent), bitangent) < 0)
        {
            tangent = -tangent;
        }
        mat3 tangentModelMatrix = mat3(tangent, bitangent, normal);
        vec3 modelNormal = tangentModelMatrix * normalMap;

        float a = 4;
        float kA = 0.01;
        float kD = 1.0;<commit_msg>bit more ambient light<commit_after>#version 410

in vec3 fPosition;
in vec2 fTexCoord;
in vec3 fNormal;
in vec3 fTangent;
in vec3 fBitangent;

uniform sampler2D DiffuseTexture;
uniform sampler2D SpecularTexture;
uniform sampler2D NormalTexture;

out vec4 FragColor;

uniform mat4 WorldModel;
uniform vec3 CameraPosition;
uniform int IlluminationModel;

void main()
{
    vec3 worldLightPosition = vec3(500, 400, 0);
    vec3 modelLightPosition = (WorldModel * vec4(worldLightPosition, 1)).xyz;
    
    vec3 modelCameraPos = (WorldModel * vec4(CameraPosition, 1)).xyz;

    vec3 modelPosition = fPosition;
    vec3 L = normalize(modelLightPosition - modelPosition); // light direction
    vec3 V = normalize(modelCameraPos - modelPosition); // towards viewer

    if (IlluminationModel == 1) // standard opaque material
    {
        vec4 diffuseMap = texture(DiffuseTexture, fTexCoord);
        vec4 specularMap = texture(SpecularTexture, fTexCoord);

        vec3 normalMap = normalize(texture(NormalTexture, fTexCoord).rgb);
        vec3 tangent = normalize(fTangent);
        vec3 bitangent = normalize(fBitangent);
        vec3 normal = normalize(fNormal);
        if (dot(cross(normal, tangent), bitangent) < 0)
        {
            tangent = -tangent;
        }
        mat3 tangentModelMatrix = mat3(tangent, bitangent, normal);
        vec3 modelNormal = tangentModelMatrix * normalMap;

        float a = 4;
        float kA = 0.08;
        float kD = 1.0;
{'fraction_non_alphanumeric': 0.0867782712675094, 'fraction_numerical': 0.033481380252818584, 'mean_word_length': 3.3185840707964602, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1109888', 'n_tokens_mistral': 957, 'n_tokens_neox': 884, 'n_words': 246}