Ben Richards
6a26ba011c
Add RenderSteps
component for customizing WebGL render steps.
2024-12-12 15:40:34 +13:00
Ben Richards
7411a4b244
Merge remote-tracking branch 'origin/v4.0.0' into v4.0.0
2024-11-21 12:33:32 +13:00
Ben Richards
1ff1ec64d6
Add auto child property transfer option to RenderFilters.
...
Also add game config settings to RenderFilters cameras.
2024-11-21 12:32:58 +13:00
samme
f17d859049
Fix TypeError when using scene injection map
2024-11-20 07:50:39 -08:00
Ben Richards
1abe613cd6
Fix BaseFilterShader GLSL cache key access.
2024-11-19 15:08:51 +13:00
Ben Richards
3df7470110
Fix Extern stencil handling.
...
(Don't handle stencil, as we don't use it.)
2024-11-19 11:30:11 +13:00
Ben Richards
af90c85460
Fix WebGLVAOWrapper failing when it can't find an expected attribute.
...
This can happen on systems with different GLSL compilers,
which optimize entire unused attributes.
2024-11-19 10:44:34 +13:00
Ben Richards
6979e7b96b
Fix precision in Flat.vert shader.
...
It must match the fragment shader if they share uniforms.
This addresses #6951 and #6949 .
2024-11-18 19:14:35 +13:00
Ben Richards
9612b0a08d
Remove unmanaged GL state changes.
2024-11-18 19:12:11 +13:00
Ben Richards
7b4df69cec
Fix DynamicTexture not resizing immediately after creation.
...
This addresses #6953 .
2024-11-18 18:09:30 +13:00
Ben Richards
63ba370c97
Implement better roundPixels handling.
...
This bias ensures that vertex coordinates at or close to 0.5
behave predictably, and don't create unexpected 1px distortions.
2024-11-18 14:53:47 +13:00
Ben Richards
136e35099e
Revert "Fix reversion of roundPixels handling."
...
This reverts commit f9d42fe768
.
2024-11-18 10:07:11 +13:00
Ben Richards
a4871ea319
Revert "Further fix roundPixels regression."
...
This reverts commit 79bcca03d8
.
2024-11-18 10:07:01 +13:00
Ben Richards
79bcca03d8
Further fix roundPixels regression.
2024-11-15 19:20:05 +13:00
Ben Richards
f9d42fe768
Fix reversion of roundPixels handling.
2024-11-15 18:08:48 +13:00
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