File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88## v0.7.4
99
10+ - Increase floating point precision (#5 )
1011- Fix a rare glitch in the lasso selection where the lasso would be drawn with a far away point
1112- Smoothify lasso by lowering the min delay and min dist
1213- Update 2D camera and many dev packages
Original file line number Diff line number Diff line change 11const VERTEX_SHADER = `
2- precision mediump float ;
2+ precision highp float ;
33
44uniform sampler2D colorTex;
55uniform float colorTexRes;
@@ -29,7 +29,7 @@ void main() {
2929 float stateRowIndex = floor ((stateIndex + eps) / stateTexRes);
3030 vec2 stateTexIndex = vec2 (
3131 (stateIndex / stateTexRes) - stateRowIndex + eps,
32- stateRowIndex / stateTexRes
32+ stateRowIndex / stateTexRes + eps
3333 );
3434
3535 vec4 state = texture2D (stateTex, stateTexIndex);
@@ -47,13 +47,13 @@ void main() {
4747 eps = 0.5 / colorTexRes;
4848 float colorLinearIndex = colorIndex + globalState;
4949 // Need to add cEps here to avoid floating point issue that can lead to
50- // dramatic changes in which color is loaded as floor(3/2.9 ) = 1 but
50+ // dramatic changes in which color is loaded as floor(3/2.9999 ) = 1 but
5151 // floor(3/3.0001) = 0!
5252 float colorRowIndex = floor ((colorLinearIndex + eps) / colorTexRes);
5353
5454 vec2 colorTexIndex = vec2 (
5555 (colorLinearIndex / colorTexRes) - colorRowIndex + eps,
56- colorRowIndex / colorTexRes
56+ colorRowIndex / colorTexRes + eps
5757 );
5858
5959 color = texture2D (colorTex, colorTexIndex);
You can’t perform that action at this time.
0 commit comments