Commit graph

846 commits

Author SHA1 Message Date
Richard Davey
d677b57ee4 Added new utility shaders 2020-11-11 09:35:02 +00:00
Richard Davey
8e7171ca79 Use fbo stack and free-up callback hooks 2020-11-10 17:26:56 +00:00
Richard Davey
6d56ee01af Update BitmapMask.frag 2020-11-10 17:26:33 +00:00
Richard Davey
7ba1b132ab Added rebind function, to reset the shader attributes. 2020-11-10 15:50:51 +00:00
Richard Davey
6e115e4e04 Call rebind function 2020-11-10 15:50:30 +00:00
Richard Davey
47009779fb Hard-code the topology 2020-11-10 15:50:17 +00:00
Richard Davey
84f6849ad6 Fixed Bitmap Mask 2020-11-10 14:33:28 +00:00
Richard Davey
7a5165c87b Limit batch size to 1 2020-11-10 12:35:01 +00:00
Richard Davey
eda0ca8a75 Use GLenum value and limit batch size to 256 2020-11-10 12:34:53 +00:00
Richard Davey
fad0d331d7 Change to batchSize property 2020-11-10 12:34:35 +00:00
Richard Davey
86d1009e7b Use batchSize and fixed shouldFlush so we take advantage of bufferData 2020-11-10 12:34:25 +00:00
Richard Davey
e7319907c7 PostFX Pipeline only needs a single quad 2020-11-10 11:59:28 +00:00
Richard Davey
ca52436340 Removed Camera Pipeline 2020-11-10 11:59:12 +00:00
Richard Davey
94d2889783 Moved setTexture2D to pipeline class 2020-11-10 11:58:53 +00:00
Richard Davey
eee3feb667 Pass Game Object to batchQuad 2020-11-09 13:19:31 +00:00
Richard Davey
c5656fbd08 Make FLOAT the default type 2020-11-09 13:19:14 +00:00
Richard Davey
cb7a998ea0 Added onBatch support 2020-11-09 12:17:45 +00:00
Richard Davey
88809647a6 Expose outFragCoord 2020-11-06 17:22:17 +00:00
Richard Davey
abe97b18fd Remove drawFillRect and no batchTexture post fx 2020-11-06 17:22:05 +00:00
Richard Davey
92eca8d3d2 Use the new Camera post pipeline feature 2020-11-06 15:35:29 +00:00
Richard Davey
167f50f28f Added new PostFX Pipeline to extend from 2020-11-06 15:35:05 +00:00
Richard Davey
4c7d81731b Added minFilter support 2020-11-06 12:25:03 +00:00
Richard Davey
3dbbc9caee Update RenderTargetConfig.js 2020-11-06 12:24:52 +00:00
Richard Davey
a62577ee77 Added minFilter support and better docs 2020-11-06 12:24:46 +00:00
Richard Davey
554e9214e0 Smaller error 2020-11-06 11:46:06 +00:00
Richard Davey
11b92b83e7 Supports new RenderTarget instances 2020-11-06 11:42:52 +00:00
Richard Davey
f914a073f3 New RenderTarget class to handle multiple targets per pipeline 2020-11-06 11:42:39 +00:00
Richard Davey
6e90d8ed59 Corrected docs and resetTextures 2020-11-06 11:42:25 +00:00
Richard Davey
18f32331fb Expose Render Target and WebGLShader 2020-11-06 10:59:57 +00:00
Richard Davey
a06edadba2 Update WebGLPipelineConfig.js 2020-11-06 10:59:47 +00:00
Richard Davey
a8b02cfb28 Create RenderTargetConfig.js 2020-11-06 10:59:41 +00:00
Richard Davey
ff23ca57cb Use new fbo stack 2020-11-06 10:19:34 +00:00
Richard Davey
02bde43772 Added fboStack, pushFramebuffer, popFramebuffer and resetTextures parameter 2020-11-06 10:19:26 +00:00
Richard Davey
d3c70002ea Removed use of _tempMatrix from all renderers 2020-11-06 09:44:29 +00:00
Richard Davey
701b899511 Update MultiPipeline.js 2020-11-05 18:05:58 +00:00
Richard Davey
18d2de8f1c Update SinglePipeline.js 2020-11-05 18:05:49 +00:00
Richard Davey
1a3a7d1151 Update WebGLPipeline.js 2020-11-05 18:05:19 +00:00
Richard Davey
883402da8a Added forceZero method and used it 2020-11-05 10:50:40 +00:00
Richard Davey
3696f73674 Guard against missing shaders. 2020-11-05 10:08:41 +00:00
Richard Davey
60e6eff81c Don't .replace non-strings. 2020-11-05 10:08:21 +00:00
Richard Davey
e9efc5e8f2 Invokes pre and post batch functions. 2020-11-04 18:02:22 +00:00
Richard Davey
4287181b2b Added manager, target auto clear, clearTarget and lots of new hooks for handlers, plus post bind and post flush support. 2020-11-04 18:02:11 +00:00
Richard Davey
f94e7b4f75 Set dimensions before resizing. Validate gl objects before deleting them. 2020-11-04 18:01:39 +00:00
Richard Davey
d6496c86cf Added JSDocs 2020-11-04 18:01:20 +00:00
Richard Davey
305106bebe Correct sampler ID 2020-11-04 18:01:11 +00:00
Richard Davey
34f3ae9755 Removed stack and lock support 2020-11-04 18:01:01 +00:00
Richard Davey
4747d204ca Added unbind method and handling for post-fx 2020-11-03 18:05:10 +00:00
Richard Davey
e72a3b27e4 Call new unbind method 2020-11-03 18:04:57 +00:00
Richard Davey
ebe5ba1a0a New attributes, removed un-used properties, fixed JSDocs 2020-11-03 11:32:05 +00:00
Richard Davey
93948f5b29 JSDocs fixes 2020-11-03 11:31:52 +00:00
Richard Davey
f4b95ab2c3 New simplified Graphics shaders 2020-11-03 11:31:32 +00:00
Richard Davey
10673da96b Graphics is as Graphics does 2020-11-02 22:39:30 +00:00
Richard Davey
9e1b8c4b2f Don't look-up properties from uniforms that aren't cached 2020-11-02 22:39:20 +00:00
Richard Davey
d05afa988f Added batchVert method to help make customization easier 2020-11-02 22:39:08 +00:00
Richard Davey
3caa51a938 Update GraphicsPipeline.js 2020-11-02 16:20:16 +00:00
Richard Davey
a5ae67e1a6 Added Camera Pipeline 2020-10-30 17:55:56 +00:00
Richard Davey
4c3a5223fe Added onFlush and onPostFlush 2020-10-30 17:55:36 +00:00
Richard Davey
ca4168e5d0 New Camera Pipeline, better boot handling, tidied up docs 2020-10-30 17:50:58 +00:00
Richard Davey
52d8140b4f New onResize callback and better matrix handling 2020-10-30 17:50:38 +00:00
Richard Davey
5dbec83a8b Using new Camera Pipeline (renderTexture todo) 2020-10-30 17:50:19 +00:00
Richard Davey
b73067a7a7 Implemented full uniform caching and setting handling. So much faster! 2020-10-30 17:50:06 +00:00
Richard Davey
4e7e5629d2 You can forceZero via the config now 2020-10-30 17:49:39 +00:00
Richard Davey
0a006e4c20 Tidied up parameters 2020-10-29 17:22:57 +00:00
Richard Davey
ebf7b19062 Removed unused code 2020-10-29 17:22:47 +00:00
Richard Davey
d39968e0a1 Parameter not needed 2020-10-29 17:22:39 +00:00
Richard Davey
6353496751 Added the ability for a pipeline to be locked or unlocked 2020-10-29 17:22:29 +00:00
Richard Davey
c9d56f5f1d Removed unused matrices and method 2020-10-29 14:41:22 +00:00
Richard Davey
9a0f33d24c Cause a full bind on first set 2020-10-29 14:41:04 +00:00
Richard Davey
4b48baea79 Removed all of the uniform code 2020-10-29 14:40:49 +00:00
Richard Davey
4badd54160 Added resetProgram and changed return values 2020-10-29 14:40:33 +00:00
Richard Davey
024f13f2ba No longer use uViewMatrix or uModelMatrix 2020-10-29 14:37:52 +00:00
Richard Davey
b74351a87d Update WebGLPipeline.js 2020-10-29 08:22:38 +00:00
Richard Davey
9e4141e18b Pass the Game Object 2020-10-28 18:13:34 +00:00
Richard Davey
b1b44cd7f0 onBoot and setShader methods 2020-10-28 18:13:27 +00:00
Richard Davey
e1452b9ce7 Update WebGLShader.js 2020-10-28 17:40:21 +00:00
Richard Davey
48c0ba26c2 Better flush handling 2020-10-28 17:40:06 +00:00
Richard Davey
c5b538afcd Added the new Graphics Pipeline 2020-10-28 17:39:54 +00:00
Richard Davey
d6ecea8d4d Use the new attributes format 2020-10-28 17:39:31 +00:00
Richard Davey
92c365a881 Removed all Graphics methods and related properties. 2020-10-28 16:53:31 +00:00
Richard Davey
8c6e67ecfc Added attributes and other shader specific properties and methods 2020-10-28 16:15:56 +00:00
Richard Davey
e52def85be All vertex values now set during boot, after shaders are created. Added batchQuad/Tri methods. 2020-10-28 16:15:35 +00:00
Richard Davey
389b480777 Using new easier attribute config + moved some methods to WebGLPipeline 2020-10-28 16:15:09 +00:00
Richard Davey
15d8eabf17 Single pipeline updated so it can easily extend Multi now 2020-10-28 16:14:42 +00:00
Richard Davey
93b1775aaa Added new WebGL consts for easier shader configs 2020-10-28 16:14:05 +00:00
Richard Davey
9aeb765696 Updated type defs 2020-10-28 16:13:46 +00:00
Richard Davey
120f2c87cb The WebGL.Utils.getComponentCount function has been removed as this is no longer required internally. 2020-10-28 16:13:29 +00:00
Richard Davey
88d2ecd760 Pipeline passes attributes off to Shader. Also fixed multi-shader setup. 2020-10-27 18:06:45 +00:00
Richard Davey
39c77f431f Flush here, rather than in renderer 2020-10-27 18:06:28 +00:00
Richard Davey
a5d6016e64 Move sequence so the renderer is clean 2020-10-27 18:06:13 +00:00
Richard Davey
f42f0ce0d6 Shader needs attributes 2020-10-27 18:06:00 +00:00
Richard Davey
7b5d6076b2 Added max size value 2020-10-27 14:41:43 +00:00
Richard Davey
f50560eba8 The WebGLRenderer.getMaxTextures method has been removed. This is no longer needed as you can use the WebGLRenderer.maxTextures property instead. 2020-10-27 14:36:43 +00:00
Richard Davey
93b569c5ca Look-up based on string or instance 2020-10-27 14:05:48 +00:00
Richard Davey
59a215d643 * Types.Core.PipelineConfig is a new configuration object that you can set in the Game Config under the pipeline property. It allows you to define custom WebGL pipelines as part of the Game Config, so they're automatically installed and ready for use by all Scenes in your game. You can either set the pipeline object, or set it under the render sub-config. 2020-10-27 13:44:58 +00:00
Richard Davey
98b4319436 Bind needs to return this 2020-10-27 12:26:01 +00:00
Richard Davey
4ebdc637a9 Tidied up method flow 2020-10-27 12:25:53 +00:00
Richard Davey
d2c025e38a Added target fbo and all of the shader setters back in 2020-10-27 12:25:42 +00:00
Richard Davey
2b3863272e Removed 'nativeTextures' and added new reset parameter
* The `WebGLRenderer.nativeTextures` array has been removed and any WebGLTextures created by the renderer are no longer stored within it. All WebGLTexture instances are stored in the `TextureSource` objects anyway, or by local classes such as RenderTexture, so there was no need to have another array taking up memroy.
* The `WebGLRenderer.deleteTexture` method has a new optional boolean parameter `reset` which allows you to control if the `WebGLRenderer.resetTextures` method is called, or not, after the texture is deleted.
2020-10-27 11:38:21 +00:00
Richard Davey
efbc256a1f Added target fbo 2020-10-26 17:13:24 +00:00
Richard Davey
3c7062ca6a Common strings. 2020-10-26 17:00:23 +00:00