"\n"
"#line 2 0 \n"
"\n"
-"uniform mat4 uPv;\n"
"uniform mat4x3 uMdl;\n"
+"uniform mat4 uPv;\n"
"\n"
"out vec4 aColour;\n"
"out vec2 aUv;\n"
" float g_water_fog;\n"
" int g_light_count;\n"
" int g_light_preview;\n"
+" int g_shadow_samples;\n"
"};\n"
"\n"
"uniform sampler2D g_world_depth;\n"
"\n"
"vec3 do_light_shadowing( vec3 vfrag )\n"
"{\n"
+" if( g_shadow_samples == 0 )\n"
+" {\n"
+" return vfrag;\n"
+" }\n"
+"\n"
" float fspread = g_light_colours[0].w;\n"
" vec3 vdir = g_light_directions[0].xyz;\n"
" float flength = g_light_directions[0].w;\n"
""},
};
-static GLuint _uniform_route_uPv;
static GLuint _uniform_route_uMdl;
+static GLuint _uniform_route_uPv;
static GLuint _uniform_route_uTexGarbage;
static GLuint _uniform_route_uTexGradients;
static GLuint _uniform_route_uCamera;
static GLuint _uniform_route_uColour;
static GLuint _uniform_route_g_world_depth;
-static void shader_route_uPv(m4x4f m){
- glUniformMatrix4fv( _uniform_route_uPv, 1, GL_FALSE, (float *)m );
-}
static void shader_route_uMdl(m4x3f m){
glUniformMatrix4x3fv( _uniform_route_uMdl, 1, GL_FALSE, (float *)m );
}
+static void shader_route_uPv(m4x4f m){
+ glUniformMatrix4fv( _uniform_route_uPv, 1, GL_FALSE, (float *)m );
+}
static void shader_route_uTexGarbage(int i){
glUniform1i( _uniform_route_uTexGarbage, i );
}
}
static void shader_route_use(void){ glUseProgram(_shader_route.id); }
static void shader_route_link(void){
- _uniform_route_uPv = glGetUniformLocation( _shader_route.id, "uPv" );
_uniform_route_uMdl = glGetUniformLocation( _shader_route.id, "uMdl" );
+ _uniform_route_uPv = glGetUniformLocation( _shader_route.id, "uPv" );
_uniform_route_uTexGarbage = glGetUniformLocation( _shader_route.id, "uTexGarbage" );
_uniform_route_uTexGradients = glGetUniformLocation( _shader_route.id, "uTexGradients" );
_uniform_route_uCamera = glGetUniformLocation( _shader_route.id, "uCamera" );