Browse Source

Fix first stroke not drawing because it has Z=0

sdf
A.Olokhtonov 1 week ago
parent
commit
da755e4ec2
  1. 2
      README.txt
  2. 4
      client/webgl_shaders.js

2
README.txt

@ -67,7 +67,7 @@ Release: @@ -67,7 +67,7 @@ Release:
- Set up VAOs
- We are calling "geometry_prepare_stroke" twice for some reason
- Replace "geometry_add_dummy_stroke" with something not [so] cursed
- Automatically extract locations from shaders (see nitka project for code examples)
+ Automatically extract locations from shaders (see nitka project for code examples)
- Presentation / "marketing"
- Title (InfiNotes? MegaDesk?)
- Icon

4
client/webgl_shaders.js

@ -68,7 +68,7 @@ const sdf_vs_src = `#version 300 es @@ -68,7 +68,7 @@ const sdf_vs_src = `#version 300 es
screen02 += vec2(100.0); // shift offscreen
}
gl_Position = vec4(screen02 - 1.0, (float(stroke_index) / float(u_stroke_count)) * 2.0 - 1.0, 1.0);
gl_Position = vec4(screen02 - 1.0, (float(stroke_index + 1) / float(u_stroke_count)) * 2.0 - 1.0, 1.0);
}
`;
@ -323,10 +323,8 @@ function init_webgl(state, context) { @@ -323,10 +323,8 @@ function init_webgl(state, context) {
gl.enable(gl.BLEND);
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
/*
gl.enable(gl.DEPTH_TEST);
gl.depthFunc(gl.NOTEQUAL);
*/
context.gpu_timer_ext = gl.getExtension('EXT_disjoint_timer_query_webgl2');
if (context.gpu_timer_ext === null) {

Loading…
Cancel
Save