From: Mikko Rasa Date: Sat, 24 Apr 2021 11:54:49 +0000 (+0300) Subject: Remove the deprecated singlepass shader X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f87993e0748f711b0b2439fe6ab4945bddad25c0;p=libs%2Fgl.git Remove the deprecated singlepass shader It's become broken to the extent that it isn't worth fixing. --- diff --git a/shaderlib/singlepass.glsl b/shaderlib/singlepass.glsl deleted file mode 100644 index eef6a532..00000000 --- a/shaderlib/singlepass.glsl +++ /dev/null @@ -1,170 +0,0 @@ -// Deprecated; use phong.glsl instead. -import msp_interface; - -const bool use_vertex_color = false; - -const bool use_lighting = false; -const bool use_specular = false; -const bool use_sky = false; -const bool use_fog = false; - -const bool use_diffuse_map = false; -const bool use_normal_map = false; - -const bool use_shadow_map = false; - -const bool use_environment_map = false; - -#pragma MSP stage(vertex) -vec4 get_vertex_position() -{ - return vertex; -} - -vec3 get_vertex_normal() -{ - return normal; -} - -void singlepass_transform_and_lighting() -{ - out vec4 eye_vertex = eye_obj_matrix*get_vertex_position(); - gl_Position = projection_matrix*eye_vertex; - - out vec3 eye_normal = eye_obj_normal_matrix*get_vertex_normal(); - vec3 eye_tangent = eye_obj_normal_matrix*tangent; - vec3 eye_binormal = eye_obj_normal_matrix*binormal; - out mat3 eye_tbn_matrix = mat3(eye_tangent, eye_binormal, eye_normal); - - out vec3 incident_dir = normalize(eye_vertex.xyz); - if(use_normal_map) - incident_dir = incident_dir*eye_tbn_matrix; - - vec3 ldir = normalize(light_sources[0].position.xyz-eye_vertex.xyz*light_sources[0].position.w); - if(use_normal_map) - ldir = ldir*eye_tbn_matrix; - out vec3 light_dir = ldir; - - out vec3 tbn_zenith_dir = eye_zenith_dir*eye_tbn_matrix; - out vec3 shadow_coord = (shd_eye_matrix*eye_vertex).xyz; - out float fog_coord = eye_vertex.z; - - for(int i=0; i