|
@@ -1022,6 +1022,11 @@ void fragment_shader(in SceneData scene_data) {
|
|
|
inv_view_matrix[1][3] = 0.0;
|
|
|
inv_view_matrix[2][3] = 0.0;
|
|
|
#endif
|
|
|
+
|
|
|
+#ifdef LIGHT_VERTEX_USED
|
|
|
+ vec3 light_vertex = vertex;
|
|
|
+#endif //LIGHT_VERTEX_USED
|
|
|
+
|
|
|
mat4 read_view_matrix = scene_data.view_matrix;
|
|
|
vec2 read_viewport_size = scene_data.viewport_size;
|
|
|
{
|
|
@@ -1032,6 +1037,15 @@ void fragment_shader(in SceneData scene_data) {
|
|
|
transmittance_color.a *= sss_strength;
|
|
|
#endif
|
|
|
|
|
|
+#ifdef LIGHT_VERTEX_USED
|
|
|
+ vertex = light_vertex;
|
|
|
+#ifdef USE_MULTIVIEW
|
|
|
+ view = -normalize(vertex - eye_offset);
|
|
|
+#else
|
|
|
+ view = -normalize(vertex);
|
|
|
+#endif //USE_MULTIVIEW
|
|
|
+#endif //LIGHT_VERTEX_USED
|
|
|
+
|
|
|
#ifndef USE_SHADOW_TO_OPACITY
|
|
|
|
|
|
#ifdef ALPHA_SCISSOR_USED
|