Skip to content

Commit f7fe9f0

Browse files
committed
Update CHANGELOG-v3.50.md
1 parent 6912124 commit f7fe9f0

1 file changed

Lines changed: 43 additions & 4 deletions

File tree

CHANGELOG-v3.50.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ The WebGL Pipeline class now extends Event Emitter and emits the following event
9797
* The `WebGL.Pipelines.Events.REBIND` event is dispatched by a WebGL Pipeline when the Pipeline Manager resets and rebinds it.
9898
* The `WebGL.Pipelines.Events.RESIZE` event is dispatched by a WebGL Pipeline when it is resized, usually as a result of the Renderer.
9999

100-
### Pipeline Uniform Changes
100+
### Pipeline Uniform Changes
101101

102-
WebGLShaders a`uniforms` object that is automatically populated when the shader is created. It scans all of the active uniforms from the compiled shader and then builds an object containing their `WebGLUniformLocation` and a value cache.
102+
WebGLShaders have a `uniforms` object that is automatically populated when the shader is created. It scans all of the active uniforms from the compiled shader and then builds an object containing their `WebGLUniformLocation` and a value cache.
103103

104104
This saves redundant gl operations for both looking-up uniform locations and setting their values if they're already the currently set values by using the local cache instead.
105105

@@ -249,7 +249,44 @@ The following properties and methods are available in the new `RenderTexture` cl
249249

250250
### Point Lights
251251

252-
TODO
252+
The Point Light Game Object is brand new in 3.50 and provides a way to add a point light effect into your game, without the expensive shader processing requirements of the traditional Light Game Object.
253+
254+
The difference is that the Point Light renders using a custom shader, designed to give the impression of a radial light source, of variable radius, intensity and color, in your game. However, unlike the Light Game Object, it does not impact any other Game Objects, or use their normal maps for calcuations. This makes them extremely fast to render compared to Lights
255+
and perfect for special effects, such as flickering torches or muzzle flashes.
256+
257+
For maximum performance you should batch Point Light Game Objects together. This means ensuring they follow each other consecutively on the display list. Ideally, use a Layer Game Object and then add just Point Lights to it, so that it can batch together the rendering of the lights. You don't _have_ to do this, and if you've only a handful of Point Lights in your game then it's perfectly safe to mix them into the dislay list as normal. However, if you're using a large number of them, please consider how they are mixed into the display list.
258+
259+
The renderer will automatically cull Point Lights. Those with a radius that does not intersect with the Camera will be skipped in the rendering list. This happens automatically and the culled state is refreshed every frame, for every camera.
260+
261+
The `PointLight` Game Object has the following unique properties and methods:
262+
263+
* The `PointLight.color` property is an instance of the Color object that controls the color value of the light.
264+
* The `PointLight.intensity` property sets the intensity of the light. The colors of the light are multiplied by this value during rendering.
265+
* The `PointLight.attenuation` property sets the attenuation of the light, which is the force with which the light falls off from its center.
266+
* The `PointLight.radius` property sets the radius of the light, in pixels. This value is also used for culling.
267+
268+
Point Lights also have corresponding Factory and Creator functions, available from within a Scene:
269+
270+
```js
271+
this.add.pointlight(x, y, color, radius, intensity, attenuation);
272+
```
273+
274+
and
275+
276+
```js
277+
this.make.pointlight({ x, y, color, radius, intensity, attenuation });
278+
```
279+
280+
### Point Lights Pipeline
281+
282+
The Point Light Pipeline is a brand new pipeline in 3.50 that was creates specifically for rendering the new Point Light Game Objects in WebGL.
283+
284+
It extends the WebGLPipeline and sets the required shader attributes and uniforms for Point Light rendering.
285+
286+
You typically don't access or set the pipeline directly, but rather create instances of the Point Light Game Object instead. However, it does have the following unique methods:
287+
288+
* The `PointLightPipeline.batchPointLight` method is a special-case method that is called directly by the Point Light Game Object during rendering and allows it to add itself into the rendering batch.
289+
* The `PointLightPipeline.batchLightVert` method is a special internal method, used by `batchPointLight` that adds a single Point Light vert into the batch.
253290

254291
### Utility Pipeline
255292

@@ -1237,4 +1274,6 @@ My thanks to the following for helping with the Phaser 3 Examples, Docs, and Typ
12371274

12381275
A special mention to the following who submitted feedback on the the 3.50 Beta releases:
12391276

1240-
Acorn BlunT76 @PhaserEditor2D @samme @rexrainbow
1277+
@gammafp Acorn @BlunT76 @PhaserEditor2D @samme @rexrainbow @vforsh @kainage @ccaleb @spayton @FloodGames @buzzjeux @jcyuan @MadDogMayCry0 @Patapits @MMontalto @SBCGames @juanitogan @Racoonacoon @EmilSV @telinc1 @d7561985 @RollinSafary
1278+
1279+
Sorry if I forgot you!

0 commit comments

Comments
 (0)