Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lightprobe_grid_display_vert.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/lightprobe_grid_display_vert.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_grid_display_vert.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_grid_display_vert.glsl
index 6fefe1319bd..b22d63de29e 100644
--- a/source/blender/draw/engines/eevee/shaders/lightprobe_grid_display_vert.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lightprobe_grid_display_vert.glsl
@@ -8,7 +8,6 @@ uniform vec3 corner;
uniform vec3 increment_x;
uniform vec3 increment_y;
uniform vec3 increment_z;
-uniform vec3 screen_vecs[2];
flat out int cellOffset;
out vec2 quadCoord;
@@ -39,9 +38,10 @@ void main()
increment_z * ls_cell_location.z);
quadCoord = pos[vert_id];
- vec3 screen_pos = screen_vecs[0] * quadCoord.x + screen_vecs[1] * quadCoord.y;
+ vec3 screen_pos = ViewMatrixInverse[0].xyz * quadCoord.x +
+ ViewMatrixInverse[1].xyz * quadCoord.y;
ws_cell_location += screen_pos * sphere_size;
- gl_Position = ViewProjectionMatrix * vec4(ws_cell_location, 1.0);
+ gl_Position = ProjectionMatrix * (ViewMatrix * vec4(ws_cell_location, 1.0));
gl_Position.z += 0.0001; /* Small bias to let the icon draw without zfighting */
}