]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
shader is a bit better
authorLockedLunatic <locked.lunatic@aon.at>
Sat, 9 May 2015 21:26:34 +0000 (23:26 +0200)
committerLockedLunatic <locked.lunatic@aon.at>
Sat, 9 May 2015 21:26:34 +0000 (23:26 +0200)
shader/basicTexture_VS.hlsl
shader/lightingTexture_FS.hlsl

index 26f907a8b1a4e75ed0faf4ce17d7ff173043bd75..aed3112268ad6f1bc22f917dea20390dd299b204 100644 (file)
@@ -26,6 +26,6 @@ void main()
        worldPointLightDir1 = PointLightPosition1 - world_Position.xyz;
 
        gl_Position = uProjection * uView * world_Position;
-       worldNormal = (uModel * vec4(aNormal, 0.0f)).xyz;
+       worldNormal = normalize((uModel * vec4(aNormal, 0.0f)).xyz);
        cameraVec = normalize(cameraPos - world_Position.xyz);
 }
\ No newline at end of file
index 8a2599fe301254ce09277bbf892b0e2330b68384..8ec4fe804e888ba6922000d8184b0863d0801cff 100644 (file)
@@ -47,7 +47,7 @@ void main()
                ), uvColor.a);
 
 
-       //FragmentColor = vec4(worldNormal, 1.0f);
+       //FragmentColor = vec4((normalize(worldNormal) + 1) / 2, 1.0f);
        //FragmentColor = vec4(length(DirectionalLightDirection1) - 1.0f, length(DirectionalLightDirection1) - 1.0f, length(DirectionalLightDirection1) - 1.0f, 1.0f);
 
        //vec3 uvColor = texture(uColorTexture, fUVs).rgb;