Commit graph

14581 commits

Author SHA1 Message Date
Richard Davey
491ca62373 The TextureTintStripPipeline now extends TextureTintPipeline and just changes the topolgy, vastly reducing the filesize. 2020-07-17 17:04:40 +01:00
Richard Davey
8d976d6ed5 WebGLRenderer.textureFlush is a new property that keeps track of the total texture flushes per frame. 2020-07-17 16:36:18 +01:00
Richard Davey
a310bd08c0 Update CHANGELOG.md 2020-07-17 15:49:07 +01:00
Richard Davey
f3ebada1e0 Tidy up everything after rendering 2020-07-17 15:49:03 +01:00
Richard Davey
9280a73bf9 StaticTilemapLayer now includes the ModelViewProjection mixin, so it doesn't need to modify the pipeline during rendering. 2020-07-17 15:48:53 +01:00
Richard Davey
ea8102f1f5 Update CHANGELOG.md 2020-07-17 13:58:41 +01:00
Richard Davey
10c19bd24d StaticTilemapLayer.upload will now set the vertex attributes and buffer the data, and handles internal checks more efficiently. 2020-07-17 13:58:38 +01:00
Richard Davey
6e15f6b77d Refactored to tidy it up and also now works with Light2D pipeline 2020-07-17 13:56:56 +01:00
Richard Davey
8bb49332a9 Always set rotation 2020-07-17 13:55:50 +01:00
Richard Davey
d11a16deaa Added forceZero and setAttribPointers
`WebGLPipeline.forceZero` is a new property that informs Game Objects if the pipeline requires a zero bound texture unit.
* `WebGLPipeline.setAttribPointers` is a new method that will set the vertex attribute pointers for the pipeline.
2020-07-17 13:55:39 +01:00
Richard Davey
dc04949d3d Needs fixing tomorrow 2020-07-16 18:10:40 +01:00
Richard Davey
f89d53ca0d Update DynamicTilemapLayerWebGLRenderer.js 2020-07-16 17:43:14 +01:00
Richard Davey
7712d0459d Update CHANGELOG.md 2020-07-16 17:43:10 +01:00
Richard Davey
97f601f378 LightsManager.cull now takes the viewport height from the renderer instead of the game config 2020-07-16 17:42:58 +01:00
Richard Davey
507cbf63b5 Update CHANGELOG.md 2020-07-16 17:00:02 +01:00
Richard Davey
d942e2bd47 Update TextWebGLRenderer.js 2020-07-16 16:59:59 +01:00
Richard Davey
848377b8d8 The TileSprite Game Objects now support rendering with normal maps. 2020-07-16 16:59:53 +01:00
Richard Davey
fea1ade5b7 Update WebGLRenderer.js 2020-07-16 16:59:45 +01:00
Richard Davey
51f0111700 Update CHANGELOG.md 2020-07-16 16:17:20 +01:00
Richard Davey
12fc51e2e2 If normal map set, advance the current active texture 2020-07-16 16:17:16 +01:00
Richard Davey
3dd6d8a1a4 Remove forceZero and added textureUnit 2020-07-16 16:16:57 +01:00
Richard Davey
5e8c28d468 Removed batchTexture as it's no longer needed 2020-07-16 16:16:42 +01:00
Richard Davey
68585f1718 The Text Game Object now supports rendering in Light2d, no matter which font, stroke or style it is using. 2020-07-16 16:16:26 +01:00
Richard Davey
76de5c246a Update ForwardDiffuseLightPipeline.js 2020-07-16 15:51:12 +01:00
Richard Davey
6aba9e71b1 All Shape Game Objects (Rectangle, IsoBox, Star, Polygon, etc) now support rendering in Light2d. 2020-07-16 15:51:07 +01:00
Richard Davey
786f78e91d Particle Emitter Game Objects now support rendering in Light2d. 2020-07-16 15:32:06 +01:00
Richard Davey
71d85be0df Mesh and Quad Game Objects now support rendering with normal maps. 2020-07-16 15:25:06 +01:00
Richard Davey
7e71b240bd Update CHANGELOG.md 2020-07-16 15:18:08 +01:00
Richard Davey
e7957b9380 Added getNormalMap and setGameObject 2020-07-16 15:18:02 +01:00
Richard Davey
f7e6847027 Added setGameObject method and currentUnit property 2020-07-16 15:16:17 +01:00
Richard Davey
5986f8f080 Tidying 2020-07-16 15:16:01 +01:00
Richard Davey
6c9a5f62a6 Uses setGameObject to support Light2D 2020-07-16 15:15:48 +01:00
Richard Davey
b4f0c9fde2 Uses setGameObject to support Light2D 2020-07-16 15:15:33 +01:00
Richard Davey
0c411e9e7e Removed currentUnit and batchSprite forceZero 2020-07-16 15:13:47 +01:00
Richard Davey
85f63c4a19 WebGLRenderer.isNewNormalMap is a new method that returns a boolean if the given parameters are not currently used. 2020-07-16 15:11:43 +01:00
Richard Davey
5db55a85d7 The Graphics Game Objects now support rendering in Light2d. You can even use normal map textures for the texture fills. 2020-07-16 15:10:45 +01:00
Richard Davey
a62c456564 Update CHANGELOG.md 2020-07-16 11:04:13 +01:00
Richard Davey
38e7495b61 Fixed default normal map so all Game Objects will now render
* The pipeline now works with Game Objects that do not have a normal map. They will be rendered using the new default normal map, which allows for a flat light effect to pass over them and merge with their diffuse map colors.
2020-07-16 11:04:10 +01:00
Richard Davey
93d0378143 Added missing jsdocs 2020-07-16 11:03:49 +01:00
Richard Davey
d1e9f2f089 Update CHANGELOG.md 2020-07-16 03:26:35 +01:00
Richard Davey
c973f41fcc Added setters and dirty check
* `Light.dirty` is a new property that controls if the light is dirty, or not, and needs its uniforms updating.
* `Light` has been recoded so that all of its properties are now setters that activate its `dirty` flag.
2020-07-16 03:26:32 +01:00
Richard Davey
1146e6f7a3 LightsManager.destroy will now clear the lightPool array when destroyed, where-as previously it didn't. 2020-07-16 03:25:25 +01:00
Richard Davey
84968f502f Update ForwardDiffuseLightPipeline.js
* The pipeline will no longer look-up and set all of the light uniforms unless the `Light` is dirty.
* The pipeline will no longer reset all of the lights unless the quantity of lights has changed.
2020-07-16 03:24:19 +01:00
Richard Davey
3b9d115d0c Reset just units 0 and 1 2020-07-16 03:13:47 +01:00
Richard Davey
d7cf9da819 Added location cache 2020-07-16 03:13:10 +01:00
Richard Davey
5059045c76 Cache attribute location
* `WebGLPipeline.boot` will now check all of the attributes and store the pointer location within the attribute entry.
* `WebGLPipeline.bind` no longer looks-up and enables every attribute, every frame. Instead it uses the cached pointer location stored in the attribute entry, cutting down on redundant WebGL operations.
2020-07-16 03:12:53 +01:00
Richard Davey
98d647848f Update CHANGELOG.md 2020-07-16 02:15:57 +01:00
Richard Davey
4ab9604102 Lots of updates to this pipeline
* The `ForwardDiffuseLightPipeline.defaultNormalMap` property has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.boot` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.onBind` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.setNormalMap` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.bind` is a new method that handles setting-up the shader uniforms.
* The `ForwardDiffuseLightPipeline.batchTexture` method has been rewritten to use the Texture Tint Pipeline function instead.
* The `ForwardDiffuseLightPipeline.batchSprite` method has been rewritten to use the Texture Tint Pipeline function instead.
2020-07-16 02:15:53 +01:00
Richard Davey
1f3b79cf11 Normal map additions
* `WebGLRenderer.normalTexture` is a new property that holds the currently bound normal map (texture unit one).
* `WebGLRenderer.setNormalMap` is a new method that sets the current normal map texture.
* `WebGLRenderer.clearNormalMap` is a new method that clears the current normal map texture.
* `WebGLRenderer.resetTextures` is a new method that flushes the pipeline, resets all textures back to the temporary ones and resets the active texture counter.
2020-07-16 02:15:01 +01:00
Richard Davey
c6ffa0620e TextureTintPipeline.batchSprite and batchTexture has new parameters forceZero which forces use of texture unit zero. 2020-07-16 02:13:08 +01:00