Browse Source

swapped eye sign

Kajetan Johannes Hammerle 3 năm trước cách đây
mục cha
commit
4b14d42ba0
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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;