Commit graph

19606 commits

Author SHA1 Message Date
Ben Richards
1421058f4d Implement ShaderProgramFactory system for shader configuration. 2024-08-19 12:45:27 +12:00
Ben Richards
16abedf87b Add Tiled animation support to TilemapLayer. 2024-08-19 12:28:27 +12:00
Ben Richards
1a45ac8eea Remove last fragments of ImageGPULayer. 2024-07-30 18:18:23 +12:00
Ben Richards
d5de498ea4 Fix incorrect lighting with rotated cameras. 2024-07-30 18:12:02 +12:00
Ben Richards
9454d1a11a Rearrange shader attribute connection.
The VertexBuffer doesn't need to know about the Program to complete
its internal layout.
But the VAO does need data from the Program to connect attributes.
So completion logic has been moved from Program to VertexBuffer,
and connection logic has been moved from Program to VAO.
2024-07-30 18:09:56 +12:00
Ben Richards
bfc7c8a417 Add Utils.parseShaderFeatures. 2024-07-30 18:07:47 +12:00
Ben Richards
877fe3aa30 Allow premultiplication setting on Uint8Array textures. 2024-07-30 18:07:09 +12:00
Ben Richards
a58f6d0f0c Move ImageGPULayer to plugin. 2024-07-23 18:02:25 +12:00
Ben Richards
affee47879 Improve memory efficiency of ImageGPULayer.
Also change its interface a lot.
2024-07-18 21:51:31 +12:00
Ben Richards
11449662e8 Add animation to ImageGPULayer. 2024-07-18 10:52:06 +12:00
Ben Richards
625e2fa042 Add ImageGPULayer rendering. 2024-07-17 16:14:01 +12:00
Ben Richards
12550a5466 Enable resizing WebGLBuffers.
It doesn't even break the VAO!
2024-07-15 20:58:26 +12:00
Ben Richards
b5264ae405 Enable instanced rendering. 2024-07-15 20:57:40 +12:00
Ben Richards
089a7afbbd Update const.js for TP3 release 2024-07-12 20:08:15 +12:00
Ben Richards
66fcac346e Add animation support to TileSprite. 2024-07-12 18:50:59 +12:00
Ben Richards
de036b999f Add lighting and self-shadowing to TileSprite. 2024-07-12 17:39:08 +12:00
Ben Richards
cf7e46eff7 Add TileSprite rendering, with rotation and dedicated shader.
This does not yet support lighting.
This supports every kind of texture except animations.
Lighting and animations should be coming soon.
2024-07-12 16:36:08 +12:00
Ben Richards
9c3a1bdebb Fix TileSprite rotation.
The order of operations now no longer produces skew.
Asymmetric scaling now no longer leaves some area untextured.
2024-07-12 12:19:10 +12:00
Ben Richards
8e8b15841a Tidy up TransformerTile.
And make it extend TransformerImage for concision.
2024-07-11 16:28:46 +12:00
Ben Richards
abace16646 Allow GameObjects to set their own BatchHandler render nodes. 2024-07-11 15:47:53 +12:00
Ben Richards
570533a705 Fix canvas coverage in TileSprite. 2024-07-11 14:48:08 +12:00
Ben Richards
f43bbcbae8 Add rotation to TileSprite.
The WebGL renderer for TileSprite is not yet implemented.
2024-07-11 14:29:50 +12:00
Ben Richards
648676b0c0 Add TilemapLayer rendering. 2024-07-10 16:54:40 +12:00
Ben Richards
0fa6f9654a Optimize strip rendering loop. 2024-07-10 12:09:30 +12:00
Ben Richards
1c0bb4a68e Update some docs. 2024-07-09 19:35:09 +12:00
Ben Richards
dd2d44c5ce Add Rope rendering and support batch rendering. 2024-07-09 19:34:57 +12:00
Ben Richards
071a1e0a70 Add shader for self-shadowing. 2024-07-08 18:28:58 +12:00
Ben Richards
f937267331 Add option for self-shadowing through bent normal approximation. 2024-07-08 18:28:23 +12:00
Ben Richards
c8c7a65ab0 Fix Light depth not respecting camera zoom. 2024-07-08 12:03:43 +12:00
Ben Richards
acaa8b553f Add Z coordinate to Light.
This eliminates relief being partially resolution-dependent.
2024-07-05 13:18:25 +12:00
Ben Richards
bc30f4a9f7 Fix blend modes in Container rendering. 2024-07-04 17:44:35 +12:00
Ben Richards
b963f148a6 Add Container and Layer rendering.
They have big spaces waiting to handle Masks and FX.
2024-07-04 17:27:22 +12:00
Ben Richards
5938923591 Add BitmapText and DynamicBitmapText rendering. 2024-07-03 18:38:58 +12:00
Ben Richards
987579dcd8 Add PointLight batch rendering. 2024-07-03 14:14:16 +12:00
Ben Richards
d6bba864a2 Use DrawingContext dimensions for uniform setting.
Specifically `uResolution` and `uProjectionMatrix`.
This allows the context to control rendering more accurately.
2024-06-27 18:24:34 +12:00
Ben Richards
7ce2d46d7c Change Grid to use padding, standard fill and stroke. 2024-06-26 18:33:14 +12:00
Ben Richards
227e5f5208 Add Shape rendering, using the Graphics render nodes. 2024-06-26 15:34:11 +12:00
Ben Richards
8f34a894a7 Improve efficiency in Graphics rendering.
We don't copy as many arrays now.
2024-06-25 16:39:17 +12:00
Ben Richards
f6d71c32cc Fix missing Graphics light shader. 2024-06-25 15:41:04 +12:00
Ben Richards
6ec1bed898 Add pathDetailThreshold for Graphics rendering. 2024-06-25 15:24:31 +12:00
Ben Richards
bd54cbb965 Add lighting and dynamic vertex indexes to Graphics. 2024-06-24 12:36:20 +12:00
Ben Richards
ff4980d85d Fix buffer initialization issues.
Support dynamic index buffer creation.
Fix config handling.
2024-06-24 12:29:47 +12:00
Ben Richards
19f47ff10c Fix losing camera scissor on cloned DrawingContext. 2024-06-21 20:15:38 +12:00
Ben Richards
0569ecf73b Add Graphics rendering.
Lighting and independent Shapes are not in this commit.
2024-06-21 20:01:28 +12:00
Ben Richards
aa69e4f8b3 Remove roundPixels from DrawingContext, but keep it in QuadLight. 2024-06-21 15:51:26 +12:00
Ben Richards
cbcb14f724 Add roundPixels override to Drawing Context.
Also enable roundPixels in Light batch handler.
2024-06-19 11:43:31 +12:00
Ben Richards
b5f775ee2e Add ParticleEmitter rendering and add lighting support.
Also fix some omitted mixin documentation.
2024-06-17 18:49:08 +12:00
Ben Richards
0243cfaa4d Support tintFill in tinter node input to SubmitterQuad. 2024-06-17 16:40:46 +12:00
Ben Richards
9994bc9270 Add Blitter rendering and extend SubmitterQuad to be more flexible. 2024-06-17 16:25:38 +12:00
Ben Richards
04f927badf Make Lighting more flexible. 2024-06-17 14:22:26 +12:00