Skip to content

Conversation

ryanhcode
Copy link

This is a WIP PR for adding support for a top-level "lighting scene ID" layer to the lighting LUT and API's regarding it, with the goal of allowing for sub-levels and similar use-cases to operate with Flywheel lighting.

Copy link
Member

@Jozufozu Jozufozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks pretty clean to me, but we should have the Backend API to provide data for lighting scenes before this merges, though I'm open to being convinced otherwise

bool _flw_chunkCoordToSectionIndex(ivec3 sectionPos, out uint index) {
bool _flw_chunkCoordToSectionIndex(uint sceneId, ivec3 sectionPos, out uint index) {
uint scene;
if (_flw_nextLut(0u, int(sceneId), scene) || scene == 0u) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cast to int here is a little spooky since the data really is a uint, but we'll realistically run out of memory before this causes issues.

Still, it could be good to have a copy of _flw_nextLut that takes a uint index

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to expose the scene ID/embedding ID here

@ryanhcode
Copy link
Author

Yeah, before the merge getting the API for interacting with scenes in would be a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants