Commit graph

820 commits

Author SHA1 Message Date
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
Richard Davey
bc34d01535 Update WebGLPipeline.js 2020-10-26 15:19:21 +00:00
Richard Davey
1e80f53f1d Better docs 2020-10-26 15:00:25 +00:00
Richard Davey
7c929e52bc Finished method docs and added clone 2020-10-26 15:00:17 +00:00
Richard Davey
ec4751ddc6 Finished all method docs 2020-10-26 15:00:07 +00:00
Richard Davey
55cbda85b8 Removed debug code 2020-10-26 14:24:15 +00:00
Richard Davey
f87bd7d384 Removed all of the shader setters. This should be done via the WebGLShader class now. 2020-10-26 14:24:06 +00:00
Richard Davey
fba97afcb6 Update dirty uniforms 2020-10-26 14:05:49 +00:00
Richard Davey
f32b4c7ecd Fixed config setter and added mvp matrices 2020-10-26 14:05:39 +00:00
Richard Davey
1e8b1cc583 Removed ProjectOrtho and optimized setters 2020-10-26 14:05:26 +00:00
Richard Davey
7ad02d6c0d Removed mvp component 2020-10-26 14:05:07 +00:00
Richard Davey
14e90c60d8 Don't resize to zero dimensions and run proper compare 2020-10-26 14:04:45 +00:00
Richard Davey
291f588110 Removed the mvp component. Pipelines no longer need this. 2020-10-26 14:04:01 +00:00
Richard Davey
8c85887479 Removed all of the mvp functions as they're no longer needed 2020-10-26 14:03:18 +00:00
Richard Davey
0b3011add3 Update PointLight-frag.js 2020-10-21 18:15:34 +01:00
Richard Davey
272727459f Use new shader property 2020-10-21 18:15:28 +01:00
Richard Davey
9531124903 Typo fix 2020-10-21 18:15:19 +01:00
Richard Davey
da47c776fa New shader class to allow one pipeline to set multiple shaders 2020-10-21 18:15:13 +01:00
Richard Davey
180b29be98 The pipeline can now handle multiple shaders all sharing the same attributes 2020-10-21 18:15:02 +01:00
Richard Davey
c730272ba7 Updated the configs to handle multiple shaders 2020-10-21 18:12:40 +01:00
Richard Davey
4b1c5c1a0b Improved docs 2020-10-21 11:30:49 +01:00
Richard Davey
7ffa615831 The WebGLPipeline.flushLocked property has been removed. A pipeline can never flush in the middle of a flush anyway, so it was just wasting CPU cycles being set. 2020-10-21 11:19:12 +01:00
Richard Davey
75f857b645 Update WebGLRenderer.js 2020-10-16 14:11:21 +01:00
Richard Davey
e50339b144 Updated to use new filtered children list 2020-10-16 14:11:15 +01:00
Richard Davey
d35ff331b2 Now takes a pre-filtered list of children to render 2020-10-16 11:36:00 +01:00
Richard Davey
675eec8103 Better attenuation 2020-10-14 15:16:35 +01:00
Richard Davey
cc167e158f Much better effect from the light shader 2020-10-14 11:57:58 +01:00