Commits

David Lin committed 351b1b6

fix errors

  • Participants
  • Parent commits 6446f6e

Comments (0)

Files changed (3)

File data/assets/programs/plastic.fragment.glsl

   vec3 hv = normalize(lv + vec3(0,0,1));
   
   // Read Albedo
-  vec3 albedo = texture(s_AlbedoMap, gs_TexCoord);
+  vec3 albedo = texture(s_AlbedoMap, gs_TexCoord).xyz;
   // Read Normal
-  vec3 gs_Normal = texture(s_NormalMap, gs_TexCoord) * 2.0 - 1.0;
+  vec3 gs_Normal = texture(s_NormalMap, gs_TexCoord).xyz * 2.0 - 1.0;
   gs_Normal = normalize((u_ModelView * vec4(gs_Normal, 0.0)).xyz);
   
   // Ambient

File data/assets/programs/scattering.fragment.glsl

 { // BEGIN
   
   // Read Normal
-  vec3 gs_Normal = texture(s_NormalMap, gs_TexCoord) * 2.0 - 1.0;
+  vec3 gs_Normal = texture(s_NormalMap, gs_TexCoord).xyz * 2.0 - 1.0;
   gs_Normal = normalize((u_ModelView * vec4(gs_Normal, 0.0)).xyz);
   
   // Calculate the distance traveled by the light inside of the object

File lib/texture/metadata.rb

 
 module My::Texture
   class Metadata < Struct.new(:width, :height, :depth, :pixel_format)
-    include OpenGL::Constants
+    include OpenGL::Constants::GL_VERSION_1_1
+    include OpenGL::Constants::GL_VERSION_1_2
+    include OpenGL::Constants::GL_VERSION_1_3
+    include OpenGL::Constants::GL_VERSION_1_4
+    include OpenGL::Constants::GL_VERSION_1_5
+    include OpenGL::Constants::GL_VERSION_2_0
+    include OpenGL::Constants::GL_VERSION_2_1
     
     # @see #bytes_per_pixel
     BYTES_PER_PIXEL = {