some tiny changes
This commit is contained in:
parent
c3d5e23518
commit
a1e6dcc95e
@ -1,4 +1,4 @@
|
||||
project(SparrowRenderer)
|
||||
project(SparrowRenderer)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
@ -80,9 +80,9 @@ void main(void) {
|
||||
#endif
|
||||
|
||||
#ifdef AMBIENT_LIGHT
|
||||
outColor = vec4(ambient + lightColor*diffuse, 1);
|
||||
outColor = vec4(ambient + lightColor*diffuse, 1);
|
||||
#else
|
||||
vec3 light = phongLighting(diffuse, specular, materialNs, lightColor, normal, lightDirInView, halfVecInView);
|
||||
vec3 light = phongLighting(diffuse, specular, materialNs, lightColor, normal, lightDirInView, halfVecInView);
|
||||
outColor = vec4(light, 1);
|
||||
#endif
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ void main(void) {
|
||||
#endif
|
||||
|
||||
#ifdef POINT_LIGHT
|
||||
lightDirInView = normalize(mat3(viewMatrix)*pointLight - posInView);
|
||||
lightDirInView = normalize(viewMatrix*pointLight - posInView);
|
||||
halfVecInView = normalize(lightDirInView - posInView);
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user