Skip to content

Commit

Permalink
💡 More light changes
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-uk committed Mar 4, 2024
1 parent 2c5d188 commit f4d6326
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shaders/phong/glsl.frag
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ precision highp float;

// ===== Constants ============================================================

const int MAX_LIGHTS = 16;
const int MAX_LIGHTS = 24;
const int MAX_SHADOWS = 8;
const float MAX_SHAD_A = 0.125;

Expand Down
2 changes: 1 addition & 1 deletion src/core/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import fragShaderBill from '../../shaders/billboard/glsl.frag'
import vertShaderBill from '../../shaders/billboard/glsl.vert'

/** @ignore Total max dynamic lights */
const MAX_LIGHTS = 16
const MAX_LIGHTS = 24

/**
* The main rendering context. This is the effectively main entry point for the library.
Expand Down
5 changes: 5 additions & 0 deletions src/engine/lights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ export class LightPoint {
/** Is this light enabled? Default: true */
public enabled: boolean

/** Metadata is a key/value store for any extra data you want to store on a node */
public metadata: Record<string, string | number | boolean>

/**
* Create a default point light, positioned at the world origin
* @param position - Position of the light in world space
Expand All @@ -284,6 +287,8 @@ export class LightPoint {
// No ambient contribution by default, this can get messy otherwise
this.ambient = Colours.BLACK
this.enabled = true

this.metadata = {}
}

/**
Expand Down

0 comments on commit f4d6326

Please sign in to comment.