Chris Willis-Ford
c9c780aa69
Merge pull request #418 from peabrainiac/develop
...
pen transparency fix
2019-04-29 17:04:15 -07:00
adroitwhiz
6646041ba4
Fix Rectangle.Clamp()
2019-04-22 08:49:20 -04:00
adroitwhiz
f9309b1ace
be more s e m a n t i c
2019-04-20 08:12:22 -04:00
adroitwhiz
7599a82406
Never useNearest on distorted vector skins
2019-04-20 07:59:09 -04:00
adroitwhiz
750f40ddf2
Exit draw region in penStamp less
2019-04-20 02:31:04 -04:00
adroitwhiz
603fd87782
Clear _regionId when exiting draw region
2019-04-20 02:27:34 -04:00
Paul Kaplan
757d7e3c96
Revert "Adjust CPU isTouchingColor to match GPU results (again)"
2019-04-19 16:13:47 -04:00
adroitwhiz
95a3c0dc6f
Appease ESLint
2019-04-19 13:50:52 -04:00
adroitwhiz
05928eb400
Add very basic pen testing to playground
2019-04-19 13:44:47 -04:00
Chris Willis-Ford
008dc5b15b
Merge pull request #419 from cwillisf/coordinates-fixups-2
...
Adjust CPU `isTouchingColor` to match GPU results (again)
2019-04-10 11:35:25 -07:00
adroitwhiz
924050baaf
Merge branch 'develop' of https://github.com/LLK/scratch-render into playground-improvements
2019-03-29 10:19:41 -04:00
adroitwhiz
0b9ee47fa1
Add "Scale (both)" option and fix quotes
2019-03-29 10:19:37 -04:00
Michael "Z" Goddard
9177705e04
Merge pull request #414 from mzgoddard/image-data-texture
...
ImageData WebGL Textures
2019-03-26 12:12:57 -04:00
adroitwhiz
3e710e66ec
Move playground style rules into stylesheet
2019-03-24 03:03:51 -04:00
adroitwhiz
2f14126d0b
Add stage scale slider to playground
2019-03-24 02:50:11 -04:00
adroitwhiz
4e9223adc6
More fixes for loading in playground
2019-03-24 02:43:15 -04:00
adroitwhiz
5419d3d2c3
Use updated Scratch cat SVG in playground
2019-03-24 02:42:13 -04:00
adroitwhiz
d4df59b23b
Fix playground not re-reading inputs after page reload
2019-03-24 02:38:05 -04:00
Christopher Willis-Ford
b304ea8fdf
Make touching-color test more robust against GPU imprecision
...
Previously, the `color-touching-tests.sb2` test "touches a color that
doesn't actually exist right now" would use a sprite with ghost 50,
blended against another sprite, to create the color that "doesn't
actually exist" when the query sprite is skipped. Unfortunately the
blend result was near a bit-boundary and, depending on the specific
hardware used, that test could fail on the GPU. When the renderer uses
the CPU path this test works fine, though, so the existing problem went
unnoticed.
To fix the problem I changed the project to use ghost 30 instead, which
results in a color that is less near a bit boundary and is therefore
less likely to fail on specific hardware.
As an example of what was happening: the `touching color` block was
checking for `RGB(127,101,216)` with a mask of `RGB(0xF8,0xF8,0xF0)`. On
the CPU it would find `RGB(120,99,215)`, which is in range, but on some
GPUs the closest color it could find was `RGB(119,98,215)` which
mismatches on all four of the least significant bits -- one of which is
enabled in the mask.
2019-03-20 22:58:36 -07:00
Christopher Willis-Ford
e864018d87
Iterate drawables in the same order on CPU & GPU
2019-03-20 11:21:05 -07:00
Christopher Willis-Ford
e0b420a183
Use alpha test to avoid false touching-color
2019-03-20 11:21:05 -07:00
Christopher Willis-Ford
a24b853af6
Fix (x,y) => point[] conversion comments
2019-03-20 11:21:05 -07:00
Christopher Willis-Ford
73896b6f32
Fix direction for Y iteration on CPU path
...
For some reason the JavaScript engine insists on running the code
instead of doing what the comment says. I guess they should match.
2019-03-20 11:21:05 -07:00
Christopher Willis-Ford
80630a64da
Adjust CPU isTouchingColor to match GPU results
2019-03-20 11:21:05 -07:00
Michael "Z" Goddard
e31934f6a9
update Skin textures with ImageData
...
When possible pass ImageData to texture creation and updating to help
remove chance of references that keep canvas and underlying data from
being garbage collected.
2019-03-19 17:52:21 -04:00
Katie Broida
8f007c0986
Only check local position against mosaic effect transform if it falls within the drawable's space
2019-03-18 15:25:40 -04:00
peabrainiac
fe01fea9d0
Update RenderWebGL.js
2019-03-03 18:49:04 +01:00
peabrainiac
5fb9346036
Update RenderWebGL.js
2019-03-03 18:42:10 +01:00
peabrainiac
3d373571f8
Update PenSkin.js
2019-03-03 18:40:09 +01:00
peabrainiac
152cf028cc
Update Skin.js
2019-03-03 18:39:40 +01:00
peabrainiac
147b79d319
Update RenderWebGL.js
2019-03-03 18:12:13 +01:00
peabrainiac
f2a7085492
Update RenderWebGL.js
2019-03-03 17:58:12 +01:00
peabrainiac
996a1d6cf7
Update sprite.frag
2019-03-03 17:55:55 +01:00
peabrainiac
61bf4c84c3
Update RenderWebGL.js
2019-03-02 22:35:42 +01:00
peabrainiac
7628c1e7f9
Update RenderWebGL.js
...
Modified blend function in `_drawThese` to blend skins with premultiplied alpha correctly
2019-03-02 20:59:00 +01:00
peabrainiac
9f7bd971c9
Update PenSkin.js
...
changed clearColor on `_setCanvasSize`
2019-03-02 00:29:21 +01:00
peabrainiac
44d2fdeba8
Update PenSkin.js
2019-02-27 08:48:45 +01:00
Michael "Z" Goddard
e022222365
replace Silhouette._data with Silhouette._colorData
...
_colorData holds the same (and more) data that _data holds. Dropping
the _data array saves a lot of memory for a tiny performance
degradation in regards to touching object.
2019-02-22 17:08:53 -05:00
Michael "Z" Goddard
be5ab2e689
receive ImageData directly in Silhouette.update
...
Given ImageData we can skip drawing the input and getting image data.
This can help if update's color can also use the ImageData directly.
2019-02-22 17:08:04 -05:00
Chris Willis-Ford
c9f86ef53b
Merge pull request #406 from cwillisf/playground-webpack
...
Add "query playground"
2019-02-14 10:33:31 -08:00
Katie Broida
1f0f89920a
Always use getAABB for bitmap skins when determining fenced position
2019-02-11 11:56:59 -05:00
Christopher Willis-Ford
c390124df4
Convert 'force GPU' flag into 'useGpuMode' enum
2019-02-06 10:47:49 -08:00
Katie Broida
c8b9516219
Use Math.ceil and Math.floor to match Scratch 2 logic
2019-02-04 16:03:33 -05:00
Christopher Willis-Ford
028b4eba3f
Adjust cursor coordinates for devicePixelRatio
2019-01-30 16:37:59 -08:00
Christopher Willis-Ford
59cef02fdb
Mark correct viewport corners with red dots
2019-01-30 15:58:51 -08:00
Christopher Willis-Ford
99d6e46f7e
Adjust rendering for crisp pixels
...
- Adjust the rotation center of the cursor so that its single pixel is
gets rendered onto a single stage pixel instead of being split across
2-4 stage pixels.
- Add canvas CSS to make most browsers scale the canvases without
interpolation.
2019-01-30 11:00:27 -08:00
Christopher Willis-Ford
992977d6c6
Add debug canvas support to isTouching CPU path
2019-01-30 11:00:14 -08:00
Christopher Willis-Ford
a358c8f916
Lint cleanup
2019-01-28 12:25:58 -08:00
Christopher Willis-Ford
e8d71277e2
Use query playground to compare GPU vs. CPU implementations
2019-01-28 11:43:38 -08:00
Christopher Willis-Ford
fba2d90fda
Stub queryPlayground.html
2019-01-25 17:28:51 -08:00