Skip to content

Add texture support for DistantLights#17

Open
jlanz wants to merge 1 commit into
OpenMoonRay:mainfrom
dreamworksanimation:export/MOONRAY-2595
Open

Add texture support for DistantLights#17
jlanz wants to merge 1 commit into
OpenMoonRay:mainfrom
dreamworksanimation:export/MOONRAY-2595

Conversation

@jlanz

@jlanz jlanz commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Resolves OpenMoonRay/openmoonray#247

Overview

Adds texture-driven importance sampling and evaluation for DistantLight, enabling textured distant lights with mip- level selection and correct pdf conversion from texture space to spherical-cap solid angle.

Changes:

  • Adds UV mapping (equisolid-angle fisheye) between local direction and texture space for DistantLight and uses it for intersect(), sample(), and eval().
  • Introduces mip-level computation for distant-light textures based on ray direction footprint and texel angular size.
  • Extends the DistantLight ISPC/C++ shared member layout to support jacobian/pdf conversion and UV mapping constants.

Filed as internal issues MOONRAY-2595, MOONRAY-6048 (DreamWorks)

Signed-off-by: Jon Lanz jon.lanz@dreamworks.com

* Work in progress

* Work in progress

* Revert

* Remove interal 180-degree rotation

* Rework introductory comment

* Work in progress

* Moar work in progress

* Bring in line with DiskLight fixes

* Working scalar version

* Add vector version

* Tweak some bits

* Remove unused member vars

* Apply Copilot feedback

* Fix comment

* Apply code review feedback

* Work on progress on fix for LightFilter issue

* Fix assert; add comments

* Add comments; remove temp code

Signed-off-by: Jon Lanz <jon.lanz@dreamworks.com>

MOONRAY-6048 (#2270)

* Fix bug

* Formatting changes

* Vectorise

Signed-off-by: Jon Lanz <jon.lanz@dreamworks.com>
@jlanz jlanz force-pushed the export/MOONRAY-2595 branch from ba943a8 to f334d7a Compare June 1, 2026 22:14
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.

Add texture support for DistantLights

2 participants