Skip to content

Conversation

@asundqui
Copy link
Contributor

Add experimental Splat Texture rendering and examples/splat-texture.

Screen.Recording.2025-06-29.at.7.32.49.PM-480.mov

This came out of an idea I had about using a texture to compute the Gaussian falloff. Then I realized I could generalize that to any texture shape RGBA. I further generalized it to a 3D texture where the focal plane selects a slice in the texture volume, allowing for smooth camera aperture blending at different camera distances. In examples/splat-texture I map the 3D texture layers to the focal plane distance, synced when you adjust "Focal plane dist".

The nice things is that this additional functionality costs nothing when not turned on, and even when turned on the lookup is probably cached up to a certain size. You can use this to craft a splat camera-response blur profile for each z depth, which could perhaps enable some sort of computational photography? I'm hoping people play with this concept and can create some beautiful effects!

Check out a branch and play with the parameters, it's a really nice effect IMO :).

Added star.png and heart.png to assets.json and to assets repo.

Update examples/depth-of-field to compute from metric aperture size.

Added SparkRenderer.renderScale debug parameter (debug #71)
Updated examples/editor:

  • set default highDPI to not(isMobile
  • added logFocalDistance, apertureAngle
  • refactored code
  • hid settings in debugFolder, renamed folders
  • default settings open now
  • added preset buttons for non-AA and AA blur settings.

@asundqui asundqui self-assigned this Jun 30, 2025
asundqui added 2 commits June 30, 2025 11:39
…Added star.png and heart.png to assets.json and to assets repo. Update examples/depth-of-field to compute from metric aperture size. Added SparkRenderer.renderScale debug parameter. Updated examples/editor: set default highDPI to true, added logFocalDistance, apertureAngle, refactored, grouped into debugFolder, default settings open, preset buttons for nonAA and AA settings.
@dmarcos dmarcos merged commit 1798855 into sparkjsdev:main Jul 1, 2025
2 checks passed
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