Skip to content

Clustered lighting cookie renderer should support changes to the texture. #4926

Description

@mvaligursky

Currently, the clustered cookie renderer assumes the texture is static, and does not update the cookie atlas when the textures changes (for example a movie texture).

See the renderCookies function that does not update the atlas here:

renderCookies(lights) {
const cookieRenderTarget = this.lightTextureAtlas.cookieRenderTarget;
for (let i = 0; i < lights.length; i++) {
const light = lights[i];
// skip clustered cookies with no assigned atlas slot
if (!light.atlasViewportAllocated)
continue;
// only render cookie when the slot is reassigned (assuming the cookie texture is static)
if (!light.atlasSlotUpdated)
continue;
this._cookieRenderer.render(light, cookieRenderTarget);
}
}

Current workaround: turn off clustered lighting

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions