Skip to content

Env map importance sampling#969

Open
kevyuu wants to merge 114 commits intomasterfrom
env_map_importance_sampling
Open

Env map importance sampling#969
kevyuu wants to merge 114 commits intomasterfrom
env_map_importance_sampling

Conversation

@kevyuu
Copy link
Copy Markdown
Contributor

@kevyuu kevyuu commented Dec 19, 2025

Description

Rework environment map importance sampling to vulkan and hlsl

Testing

Rework example 0 to use vulkan and hlsl
Unit Test Pull Request

TODO list:

  • Implement Warpmap Generation in hlsl
  • Implement Warpmap hierarchical map sampling in hlsl

@devshgraphicsprogramming
Copy link
Copy Markdown
Member

@kevyuu you've somehow reverted the submodule pointers

kevyuu added 10 commits March 31, 2026 12:43
The `generate` function in `HierarchicalWarpGenerator` was updated:
- Replaced `xi` parameter with `v` and introduced a local `xi`.
- Adjusted `directionUV` calculation to normalize coordinates by
  subtracting `0.5` and dividing by `_lastTexel` for improved accuracy.
- Added a comment to clarify the normalization process.

Commit by Kevin Yudi Utama
Refine concepts and simplify calculations in hierarchical image sampling.
@kevyuu kevyuu force-pushed the env_map_importance_sampling branch from a72eb28 to 769f5f4 Compare March 31, 2026 16:32
kevyuu added 19 commits April 1, 2026 00:33
- Remove `ScalarT` template parameter and derive `scalar_type` from `LuminanceAccessorT`.
- Remove `_layerIndex` from `HierarchicalWarpGenerator` and encapsulate layer handling in `LuminanceAccessorT`.
- Use `getAvgLuma` from `LuminanceAccessorT` instead of external `rcpAvgLuma`.
- Introduce `MipmappedLuminanceReadAccessor` concept to define accessor requirements.
- Refactor `LuminanceAccessor` to encapsulate layer index and provide methods like `get`, `resolution`, and `getAvgLuma`.
- Update `gen_warp.comp.hlsl` to use the refactored `LuminanceAccessor` and `HierarchicalWarpGenerator` interfaces.
No longer extension, so no need to mount.
The purpose of SSession is so that we don't need to recreate new pipeline from scratch for each envmap.;
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.

3 participants