Richard Davey
ab04cb6c05
Lots of LightPipeline improvements
...
* The Light Pipeline no longer creates up to `maxLights` copies of the Light shader on boot. Previously it would then pick which shader to use, based on the number of visible lights in the Scene. Now, the number of lights is passed to the shader and branches accordingly. This means rather than compiling _n_ shaders on boot, it now only ever needs to create one.
* You can now have no lights in a Scene, but the Scene will still be impacted by the ambient light. Previously, you always needed at least 1 light to trigger ambient light (thanks jstnldrs)
* The `Light.frag` shader now uses a new `uLightCount` uniform to know when to stop iterating through the max lights.
* The `LightPipeline.LIGHT_COUNT` constant has been removed as it's not used internally.
* The `LightPipeline` previous created a global level temporary vec2 for calculations. This is now part of the class as the new `tempVec2` property.
2022-09-23 00:42:04 +01:00
Richard Davey
a135271f19
Use new uLightCount uniform
2022-09-23 00:41:47 +01:00
Richard Davey
b789742636
Update Utils.js
2022-09-22 14:55:29 +01:00
Richard Davey
9d43583a63
This shader is just better. More crappy iOS testing needed though.
2022-09-21 23:13:04 +01:00
Richard Davey
023343c789
All events have a type of string. Fix #6136
2022-09-21 22:01:03 +01:00
Richard Davey
a79cb668aa
Merge pull request #6202 from samme/fix/render-texture-snapshot-pixel-alpha
...
Fix wrong alpha in snapshot pixel
2022-09-05 18:34:03 +01:00
brendo
93eceb7d99
show error code
2022-08-30 07:42:14 +08:00
samme
bbd4840dbc
Fix wrong alpha in snapshot pixel
2022-08-26 10:44:06 -07:00
Richard Davey
4c2d3e3cff
setTextureZero will now set isTextureClean
to false
2022-08-24 13:56:12 +01:00
Richard Davey
9bc8826684
Specify the canvas is for drawing, not reading
2022-08-18 18:01:45 +01:00
Richard Davey
f09ec762ee
Removed Graphics Pipeline
...
The WebGL Graphics Pipeline has been removed. This pipeline wasn't used in v3.55, as all Graphics rendering is handled by the MultiTint pipeline, for better batching support. No Phaser Game Objects use the Graphics pipeline any longer, so to save space it has been removed and is no longer installed by the Pipeline Manager.
2022-07-12 13:39:51 +01:00
Jonah Jeleniewski
e8c8be0385
Let texture scaleMode
override the antialias
setting under CANVAS
2022-06-11 18:07:29 +10:00
Richard Davey
aa2dda09e2
UtilityPipeline.blitFrame
has a new optional boolean parameter flipY
which, if set, will invert the source Render Target while drawing it to the destination Render Target.
2022-05-30 18:25:21 +01:00
samme
54d12080eb
Docs: fix the mipmapFilter
example code
2022-05-09 09:44:09 -07:00
Richard Davey
ed152b92d5
WebGLSnapshot
and CanvasSnapshot
will now Math.floor the width/height values to ensure no sub-pixel dimensions, which corrupts the resulting texture. Fix #6099
2022-05-06 14:45:36 +01:00
Richard Davey
59fbcc5ca3
Updated copyright year
2022-02-28 14:29:51 +00:00
Richard Davey
c8d3a20754
Updated Multi Pipeline shader so it no longer smacks Safari's arse.
2022-02-03 23:12:15 +00:00
Richard Davey
a4308cfa3a
Skips Canvas drawImage calls if invalid frame sizes given. Fix #5951
2022-02-03 16:44:24 +00:00
Richard Davey
0603c3bf0f
Merge pull request #5948 from jcyuan/ie9fix
...
Ie9fix
2022-02-03 16:21:29 +00:00
Andy Mikulski
6108414b75
WebGLSnapshot: Support custom rendering contexts
2022-01-26 15:02:59 -07:00
J.C
7da6f4d747
in canvas mode, don't draw stuff with no size, it will throws error, and actually unnecessary.
2021-12-21 17:18:35 +08:00
Richard Davey
0e364321e6
Update BitmapMask-frag.js
2021-11-23 18:24:14 +00:00
Richard Davey
6c459eb3d5
Update Multi-frag.js
2021-11-23 18:19:05 +00:00
Richard Davey
8699e97f94
The BitmapMask
shader has been recoded so it now works correctly if you mask a Game Object that has alpha set on it, or in its texture. Previously it would alpha the Game Object against black
2021-11-23 18:18:47 +00:00
Richard Davey
c37da11d36
pma is essential - to hell with Firefox!
2021-11-08 21:51:08 +00:00
Richard Davey
2efa08d3db
Testing pma off
2021-11-08 18:49:48 +00:00
Richard Davey
fc1234e55b
Added createProgram, setBoolean and the new src properties
2021-11-02 18:05:18 +00:00
Richard Davey
565dfc801a
WebGLPipeline.setBoolean
is a new method that allows you to set a boolean uniform on a shader.
2021-11-02 18:00:25 +00:00
Richard Davey
95d7dc71b2
Update SpriteFXPipeline.js
2021-11-02 17:05:23 +00:00
Richard Davey
c94719e0b8
Added alt swap frame
2021-10-28 01:19:52 +01:00
Richard Davey
03345ea60c
Update WebGLPipeline.js
2021-10-27 17:21:59 +01:00
Richard Davey
9980c35c3e
Update SpriteFXPipeline.js
2021-10-27 17:21:55 +01:00
Richard Davey
29ada646e0
Updated docs
2021-10-26 00:04:37 +01:00
Richard Davey
17c76c831c
The Multi Tint fragment shader now uses the new getSampler function approach from Phaser 4
2021-10-26 00:00:35 +01:00
Richard Davey
4d18ad6ff8
Removed GenerateSrc, removed need for forloop declaration
2021-10-26 00:00:20 +01:00
Richard Davey
55ef37b6fb
Removed spriteData, added destroy, tidied up docs
2021-10-21 18:38:15 +01:00
Richard Davey
0020f03ead
Fixed Sprite FX targetBounds
2021-10-20 17:02:37 +01:00
Richard Davey
143d63dcb0
Debugging
2021-10-20 12:37:05 +01:00
Richard Davey
508630ad81
Added renderTargets, maxDimension, frameInc and targetIndex
2021-10-20 12:36:54 +01:00
Richard Davey
9e38e37d6f
Removed RenderTargets (moved to PM) and flipped projection matrix
2021-10-19 22:48:02 +01:00
Richard Davey
5fb2604292
Removed flip verts
2021-10-19 22:47:34 +01:00
Richard Davey
d46f6e37f3
WebGLPipeline.flipProjectionMatrix
is a new method that allows you to flip the y and bottom projection matrix values via a parameter.
2021-10-19 22:47:22 +01:00
Richard Davey
ef4d5d94bb
New fsTarget copySubTex approach (faster)
2021-10-19 18:43:15 +01:00
Richard Davey
c6ac6125c9
Update MultiPipeline.js
2021-10-19 18:42:58 +01:00
Richard Davey
b434c3b4f8
Fixed jsdocs
2021-10-18 17:54:25 +01:00
Richard Davey
347b6db490
Added altFrame option and calculations + handy utility functions
2021-10-18 17:49:09 +01:00
Richard Davey
d4edcbd8ca
Set default vert shader
2021-10-18 16:01:53 +01:00
Richard Davey
ba0a52e386
Update SpriteFXPipeline.js
2021-10-16 15:30:03 +01:00
Richard Davey
638fd113b5
Flip the Y on textures
2021-10-16 15:23:33 +01:00
Richard Davey
5e509bd72b
Removed 'drawToFrame' (it's the only option) and added 'batchTexture'
2021-10-16 15:08:58 +01:00