Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache baked HDRI #502

Merged
merged 1 commit into from Jan 20, 2023
Merged

Cache baked HDRI #502

merged 1 commit into from Jan 20, 2023

Conversation

Meakk
Copy link
Contributor

@Meakk Meakk commented Nov 26, 2022

When using a HDRI, the PBR engine is generating 3 data:

  • a LUT 2D images (static texture)
  • 9 RGB spherical harmonics values (related to the HDRI)
  • a mipmap cubemap (related to the HDRI)

These data are quite expensive to bake depending on the user GPU, so this PR copy the result to cache files in order to reuse them if the user uses the same HDRI again which is likely to happen.

@Meakk Meakk self-assigned this Nov 26, 2022
@codecov
Copy link

codecov bot commented Nov 26, 2022

Codecov Report

Merging #502 (1e63864) into master (579c614) will increase coverage by 0.38%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #502      +/-   ##
==========================================
+ Coverage   94.06%   94.44%   +0.38%     
==========================================
  Files          97      111      +14     
  Lines        4834     5168     +334     
==========================================
+ Hits         4547     4881     +334     
  Misses        287      287              
Impacted Files Coverage Δ
...VTKExtensions/Rendering/vtkF3DCachedLUTTexture.cxx 100.00% <100.00%> (ø)
...y/VTKExtensions/Rendering/vtkF3DCachedLUTTexture.h 100.00% <100.00%> (ø)
...tensions/Rendering/vtkF3DCachedSpecularTexture.cxx 100.00% <100.00%> (ø)
...Extensions/Rendering/vtkF3DCachedSpecularTexture.h 100.00% <100.00%> (ø)
library/VTKExtensions/Rendering/vtkF3DRenderer.cxx 99.79% <100.00%> (+0.04%) ⬆️
library/VTKExtensions/Rendering/vtkF3DRenderer.h 85.71% <100.00%> (+2.38%) ⬆️
library/src/engine.cxx 93.39% <100.00%> (+0.39%) ⬆️
library/src/window_impl.cxx 98.40% <100.00%> (+0.06%) ⬆️
plugins/occt/plugin.cxx 100.00% <0.00%> (ø)
... and 23 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Meakk Meakk changed the title WIP: Cache baked HDRI Cache baked HDRI Dec 16, 2022
@Meakk Meakk requested a review from mwestphal December 16, 2022 19:10
Copy link
Contributor

@mwestphal mwestphal left a comment

Choose a reason for hiding this comment

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

First pass review. I dont understand

@mwestphal
Copy link
Contributor

Could explain what it doest in the descr ? there is some complexitry and I dont grasp it all yet.

@Meakk Meakk force-pushed the hdri-cache branch 7 times, most recently from f1a7cbf to 4fc8327 Compare December 20, 2022 22:19
@Meakk Meakk force-pushed the hdri-cache branch 3 times, most recently from 911400f to d56d03d Compare January 4, 2023 15:29
cmake/testing.cmake Outdated Show resolved Hide resolved
cmake/testing.cmake Outdated Show resolved Hide resolved
@Meakk Meakk force-pushed the hdri-cache branch 2 times, most recently from b35d766 to 6fb8ddc Compare January 17, 2023 14:04
When using a HDRI, the PBR engine is generating 3 data:

- a LUT 2D images (static texture)
- 9 RGB spherical harmonics values (related to the HDRI)
- a mipmap cubemap (related to the HDRI)

These data are quite expensive to bake depending on the user GPU, so
this PR copy the result to cache files in order to reuse them if the
user uses the same HDRI again which is likely to happen.
@Meakk Meakk merged commit f62b50d into f3d-app:master Jan 20, 2023
@Meakk Meakk deleted the hdri-cache branch January 20, 2023 19:09
@mwestphal mwestphal mentioned this pull request Apr 15, 2023
21 tasks
mwestphal pushed a commit that referenced this pull request Feb 10, 2024
When using a HDRI, the PBR engine is generating 3 data:

- a LUT 2D images (static texture)
- 9 RGB spherical harmonics values (related to the HDRI)
- a mipmap cubemap (related to the HDRI)

These data are quite expensive to bake depending on the user GPU, so
this PR copy the result to cache files in order to reuse them if the
user uses the same HDRI again which is likely to happen.
mwestphalnew pushed a commit to mwestphalnew/f3d that referenced this pull request Feb 10, 2024
When using a HDRI, the PBR engine is generating 3 data:

- a LUT 2D images (static texture)
- 9 RGB spherical harmonics values (related to the HDRI)
- a mipmap cubemap (related to the HDRI)

These data are quite expensive to bake depending on the user GPU, so
this PR copy the result to cache files in order to reuse them if the
user uses the same HDRI again which is likely to happen.
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.

None yet

2 participants