grab up axis from camera view mat
parent
7cfbd8c9f8
commit
567afc66d2
|
@ -39,7 +39,8 @@ float shadow_vsm(float distance, vec3 dir, int light_index, float min_variance,
|
|||
vec2 tex_size = textureSize(shadowMap[light_index], 0);
|
||||
vec3 texelSize = 1.0 / vec3(tex_size.xyy);
|
||||
vec3 light_plane_normal = normalize(dir);
|
||||
vec3 tangent = normalize(cross(light_plane_normal, vec3(0.0, 1.0, 0.0)));
|
||||
vec3 up_axis = normalize(view[1].xyz);
|
||||
vec3 tangent = normalize(cross(light_plane_normal, up_axis));
|
||||
vec3 bitangent = cross(light_plane_normal, tangent);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
Loading…
Reference in New Issue