X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=shaderlib%2Fshadow.glsl;h=f168fe7955431869b25f90b8909192453929bcd0;hb=c8de66203565f07f10898a74dbd55072432790fc;hp=d751b460778af84155e127b828d21c6f4f614d33;hpb=842c817bb679a5a0abc05e8149e2e6e0ae1a0412;p=libs%2Fgl.git diff --git a/shaderlib/shadow.glsl b/shaderlib/shadow.glsl index d751b460..f168fe79 100644 --- a/shaderlib/shadow.glsl +++ b/shaderlib/shadow.glsl @@ -1,5 +1,13 @@ import msp_interface; +uniform ShadowMap +{ + float shadow_darkness; + mat4 shd_eye_matrix; +}; + +uniform sampler2DShadow shadow_map; + layout(constant_id=auto) const bool use_shadow_map = false; #pragma MSP stage(vertex) @@ -9,7 +17,7 @@ void shadow_transform(vec4 eye_vertex) } #pragma MSP stage(fragment) -float get_shadow_factor(int index) +virtual float get_shadow_factor(int index) { if(use_shadow_map) {