Ben Richards
4bfa3fa7bf
Fix camera scissor.
2024-11-15 11:37:02 +13:00
Richard Davey
09ecea74f3
Expose RenderNode defaults
2024-11-14 17:06:36 +00:00
Richard Davey
e550202b28
v4.0.0 Alpha 1 merge
2024-11-14 11:40:26 +00:00
Richard Davey
79de922e5d
The Canvas Renderer and WebGL Multi Pipeline now uses the new renderRoundPixels
boolean to determine if it can render a Sprite or a Texture with rounded position values, or not. This fixes an issue where black lines would appear between tightly grouped sprites or tiles at non-integer Camera zoom values. Fix #6907
2024-10-11 00:41:43 +01:00
Richard Davey
509de6ae51
RenderTarget.resize
will now check the autoResize
property before applying the change. Textures that have been locked to a fixed size, such as FX POT buffers, will no longer be resized to the full canvas dimensions, causing Out of Memory errors on some mobile devices. Fix #6914
2024-10-10 18:37:00 +01:00
Richard Davey
c6caba7598
The RenderTarget.willResize
method will now check if the values given to it are actually numbers. If not it will return false.
2024-10-10 16:54:34 +01:00
Richard Davey
ad5b38b1cb
WebGLRenderer.setExtensions
is a new method that queries the GL context to get the list of supported extensions. Which it then sets into the class properties. This method is called internally as part of the init
and restore process.
...
When the WebGL context was restored it would incorrectly try to call `init.setupExtensions()` which didn't exist. It now calls the correct method, `WebGLRenderer.setExtensions`. Fix #6905
2024-09-17 15:08:20 +01:00
Richard Davey
9eaf661a45
Added prerenderclear event to canvas and webgl
2024-09-02 14:18:32 +01:00
Richard Davey
13035a6718
If you had a sprite on the display list using the LightPipeline, followed by a Mesh using the LightPipeline, and you invalidated the mesh (i.e. by rotating it), it would cause a runtime error in the current batch. Fix #6822
2024-08-06 23:59:42 +01:00
Richard Davey
f434449dd8
The PreFXPipeline.batchQuad
method will now apply Math.round
to the target bounds center point. This prevents sub-pixel values during the copyTextSubImage2D
call, preventing sprites with pre-fx from appearing mis-aligned during camera pans. Fix #6879
2024-08-06 23:27:34 +01:00
Richard Davey
c81c6cecc8
Remove the requirement for autoResize to be set, so anyone can resize a RenderTarget
2024-08-06 18:58:12 +01:00
zekechan
4332448e9f
Moved errors
description above @ignore tag
2024-07-17 23:32:12 +08:00
zekechan
3658cd145f
Updated default location
property from literal -1
to type number
2024-07-17 23:31:48 +08:00
Richard Davey
d12b51cb48
The Multi Pipeline batchSprite
and batchTexture
methods will now apply Math.floor
to the sprite matrix calculations if camera round pixels is enabled.
2024-07-16 22:59:22 +01:00
Richard Davey
77f209bbe5
Removed the uRoundPixels shader uniform and from the pipelines. Pass camera.roundPixels to setQuad.
2024-07-16 21:24:16 +01:00
Richard Davey
77bbab31f1
The RenderTarget
will now automatically listen for the Renderer resize event if autoResize
is true. This fixes an issue with Bitmap Masks where they wouldn't resize if the renderer resized. Fix #6769
2024-07-15 18:34:22 +01:00
Zeke Chan
5e7a8aeb01
Update RenderTarget.js
2024-07-05 14:31:06 +08:00
Zeke Chan
49c32ba5c5
Added clear
area functionality
2024-07-04 14:56:06 +08:00
Zeke Chan
7724dd0076
Update WebGLRenderer.js
2024-06-13 11:23:19 +08:00
Zeke Chan
43ce515fcb
Update WebGLRenderer.js
2024-06-11 15:25:53 +08:00
Richard Davey
4a82a8bc9b
Tidied up documentation and small code tweaks
2024-06-10 17:22:54 +01:00
Zeke Chan
48cd2fc2e0
Update WebGLRenderer.js
2024-06-11 00:05:08 +08:00
Zeke Chan
6014b2d775
Update WebGLRenderer.js
...
Added `setContextHandlers` method
2024-06-10 23:35:27 +08:00
Zeke Chan
3212f6ff33
Reapply "Update WebGLRenderer.js"
...
This reverts commit ead539a664
.
2024-06-10 14:52:57 +08:00
Zeke Chan
ead539a664
Revert "Update WebGLRenderer.js"
...
This reverts commit 6489106aa8
.
2024-06-10 14:50:14 +08:00
Zeke Chan
6489106aa8
Update WebGLRenderer.js
...
Added `dispatchContextLost`, `dispatchContextRestored` methods
2024-06-10 14:49:38 +08:00
Richard Davey
946e82b058
Removed .js from require paths (not needed)
2024-05-15 15:02:31 +01:00
Richard Davey
5d1d379991
Updated version to 3.85.0
2024-05-15 15:02:04 +01:00
Ben Richards
b1806fd721
Remove unsynced flipY
from Shader
and DynamicTexture
textures.
...
This might be causing some issues with context restore,
and seems entirely unnecessary.
2024-02-27 17:29:49 +13:00
Ben Richards
37ba3510f2
Fix RenderTexture crashing in the presence of a light.
...
More generally, anything with a default/no normal map should be fixed.
2024-02-26 17:45:52 +13:00
Ben Richards
7eede9d236
Standardise texture update in Shader.initSampler2D
.
2024-02-26 16:19:24 +13:00
Ben Richards
cab4bab15e
Eliminate duplicate code in WebGL video handling.
...
This involves a new method, `videoToTexture`.
2024-02-23 19:16:18 +13:00
Ben Richards
9a5b51dd27
Eliminate duplicate code in WebGL texture creation/update.
...
This should make the code lighter and more maintainable.
`UNPACK_FLIP_Y_WEBGL` is now always set, where previously it was allowed
to just remain default (false); this is necessary for the new code path.
`Uint8Array` sources are now allowed to generate MIPMaps.
`WebGLTextureWrapper.update` now checks the type of `pixels`, although
it should only ever be the final case.
2024-02-23 18:43:27 +13:00
Ben Richards
42039a144e
Fix failure to restore compressed textures after WebGL context loss.
2024-02-23 17:55:03 +13:00
Ben Richards
3cd756dbe9
Fix new WebGLTextures remaining bound after creation.
...
This caused an error when calling `Shader.setRenderToTexture()`
after the game started running.
The leftover texture caused a temporary cyclic reference with the new
Framebuffer. The actual rendering pipeline was not affected.
2024-02-22 19:01:03 +13:00
Ben Richards
198598882e
Document non-optional texture update flags correctly.
2024-02-22 09:56:17 +13:00
Ben Richards
a0aa09ff31
Fix WebGL errors when updating video textures.
2024-02-22 09:18:12 +13:00
Richard Davey
c445303ffb
Revert define changes as they don't work
2024-02-21 13:23:52 +00:00
Richard Davey
7aaa976a4e
Updated webpack config DefinePlugin use and corresponding defs to allow those crazy souls who import source directly on node to have a better life #6644
2024-02-21 12:57:48 +00:00
Ben Richards
13d6defb33
Fix rare text sizes failing to render.
...
If initialized at a power-of-two resolution, then resized to a
non-power-of-two resolution, some extra parameters must be updated.
2024-02-21 11:48:59 +13:00
Ben Richards
a74f99563b
Fix spritesheet from atlas from compressed texture.
2024-02-20 21:45:06 +13:00
Ben Richards
93b4b083f1
Fix setting unnecessarily high texture filters.
2024-02-20 13:10:08 +13:00
Ben Richards
a2178c8466
Fix MIPMaps being disabled for compressed textures.
2024-02-20 13:02:19 +13:00
Richard Davey
1f8276ac76
Updated copyright year, company and author
2024-02-19 17:12:24 +00:00
Richard Davey
21a10b736a
Merge pull request #6728 from moufmouf/fix-postfxpipeline
...
Fixing the Postfix pipeline without introducing a skip frame
2024-02-19 15:30:34 +00:00
Richard Davey
56213a5f7e
Update WebGLRenderer.js
2024-02-19 15:28:21 +00:00
Richard Davey
de0a22964e
WebGLPipeline.resizeUniform
is a new property that is defined in the WebGLPipelineConfig
. This is a string that defines a uResolution
property, or similar, within the pipeline shader. If the WebGL Renderer resizes, this uniform will now be updated automatically as part of the pipeline resize method. It has been added to both the Multi and Mobile pipelines as default. This fixes issues where the pipelines were rendering with old resolution values, causing graphical glitches in mostly pixel-art games. Fix #6674
2024-02-19 15:28:18 +00:00
Richard Davey
82b1a3e2aa
Added missing copyright block
2024-02-19 15:01:56 +00:00
Ben Richards
89543c9880
Change S3TCRGB to S3TCSRGB.
2024-02-17 20:59:00 +13:00
Ben Richards
878d3d2211
Fix support for BPTC and RGTC texture compression.
...
They use different WebGL extension name formats.
2024-02-13 17:38:19 +13:00