Fixed shaders to be SPIR-V compatible, added a script that converts
[demo] / shaders / default.f.glsl
index fe78fbc..a38c3f0 100644 (file)
@@ -24,12 +24,12 @@ layout(location = 0) out vec4 color;
 
 void main()
 {
-       vec4 itexel = textureCube(dstex, normalize(world_normal));
+       vec4 itexel = texture(dstex, normalize(world_normal));
 
        float dist = -pos.z;
        float fog = clamp(exp(-s.fog_density * dist), 0.0, 1.0);
 
-       vec4 texel = texture2D(tex, tex_coord);
+       vec4 texel = texture(tex, tex_coord);
 
        // vec3 object_color = (diffuse.xyz * cdiff * texel.xyz + specular.xyz * cspec) * itexel.xyz;
        vec3 object_color = s.diffuse.xyz * texel.xyz * itexel.xyz;