Browse Source

swapped eye sign

Kajetan Johannes Hammerle 3 years ago
parent
commit
4b14d42ba0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      resources/fragment.fs

+ 2 - 2
resources/fragment.fs

@@ -21,12 +21,12 @@ const vec3 light = vec3(-0.746, -0.373, -0.224);
 
 void main(void) {
     vec2 tex = varTextureG + vec2(0.0, height);
-    vec2 eye = normalize(viewPos - varPositionG).xy * heightScale;
+    vec2 eye = -normalize(viewPos - varPositionG).xy * heightScale;
 
     // kajetans variant
     if(kajetan) {
         eye *= texture(bumpSamp, tex).x;
-        tex += -eye;
+        tex += eye;
     } else {
         // lecture
         float h = 1.0;