Skip to content

IndirectLight in an AR context #3607

Answered by romainguy
ThomasGorisse asked this question in Q&A
Discussion options

You must be logged in to vote

In case 2, is there any way to directly use the KTX IndirectLight and apply the actual irradiance instead of building a new one based on it (IndirectLight.setIntensity() is possible but there is no IndirectLight.setIrradiance()) ?

Building a new IndirectLight is cheap, it's just a C++ object and we prefer to rely on builders than mutable objects. We add setters when they are truly necessary.

In case 2, how to extract the ambientColor coming from the IndirectLight generated by KTXLoader in order to apply the AR environement colorCorrection to the instant generated IndirectLight ?

The ambient color will be the first band (first 3 floats) of the spherical harmonics loaded from the KTX file.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ThomasGorisse
Comment options

You must be logged in to vote
1 reply
@romainguy
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants