diff options
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl index c9af2753baa..d1da9873228 100644 --- a/source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl +++ b/source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl @@ -15,7 +15,6 @@ layout(std140) uniform probe_block }; uniform float sphere_size; -uniform vec3 screen_vecs[2]; flat out int pid; out vec2 quadCoord; @@ -36,9 +35,10 @@ void main() quadCoord = pos[vert_id]; vec3 ws_location = probes_data[pid].position_type.xyz; - 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_location += screen_pos * sphere_size; - gl_Position = ViewProjectionMatrix * vec4(ws_location, 1.0); + gl_Position = ProjectionMatrix * (ViewMatrix * vec4(ws_location, 1.0)); gl_Position.z += 0.0001; /* Small bias to let the icon draw without zfighting */ } |