Browse Source

Fix the depth prepass artefacts

ssao
A.Olokhtonov 12 months ago
parent
commit
cca3b4cd5d
  1. 2
      client/client_recv.js
  2. 2
      client/webgl_shaders.js

2
client/client_recv.js

@ -178,7 +178,7 @@ function handle_event(state, context, event, options = {}) { @@ -178,7 +178,7 @@ function handle_event(state, context, event, options = {}) {
event.index = state.events.length;
event.starting_index = state.starting_index;
if (event.points.length > 0) {
if (event.points.length > 1) {
state.starting_index += (event.points.length - 1) * 4;
}

2
client/webgl_shaders.js

@ -125,7 +125,7 @@ const sdf_vs_src = `#version 300 es @@ -125,7 +125,7 @@ const sdf_vs_src = `#version 300 es
vec2 screen02 = screen01 * 2.0;
// Inflate quad by 1 pixel
float apron = 1.0;
float apron = 2.0;
vec2 line_dir = normalize(a_line.zw - a_line.xy);
vec2 up_dir = vec2(line_dir.y, -line_dir.x);
vec2 pixel = vec2(2.0) / u_res * apron;

Loading…
Cancel
Save