Skip to content

Save and restore activeCubeFace and activeMipmapLevel when rendering to render target#315

Open
mrxz wants to merge 1 commit intosparkjsdev:mainfrom
mrxz:fix-envmap-example
Open

Save and restore activeCubeFace and activeMipmapLevel when rendering to render target#315
mrxz wants to merge 1 commit intosparkjsdev:mainfrom
mrxz:fix-envmap-example

Conversation

@mrxz
Copy link
Copy Markdown
Collaborator

@mrxz mrxz commented Apr 22, 2026

The SplatAccumulator saves and restore the current render state. However, for the render target it only recorded the target itself and not the active cube face or active mipmap level. This caused a regression in the envMap example, where the resulting envmap does not have all its faces rendered, as can be seen by the "black" reflected in the duck model.

It would be nicer if SparkRenderer.renderCubeMap could ensure that the splats are only updated once, instead of once per cube face. That said, this bugfix would still be needed in any situation where the current render target has a non-zero cube face or mipmap level.

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.

1 participant