How to specify the color type as linear when setting the texture for the material instance #8629
Unanswered
zhenhuafan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm converting a material in Gltf to Filament and setting the parameters in code.
But there are two color type in some material, I think the right code like below is for SRGB:
Instance.setParameter("Param1", IoUtils.loadTextureAssets(engine, this,
"texture1.png",IoUtils.Companion.TextureType.COLOR)!!, sampler)
My question is what's the right code for ColorType:Linear ?
The Material parameters is like below:
"Param1":
{
"colorspace": "srgb",
"texture": "texture1"
},
"Param2":
{
"colorspace": "linear",
"texture": "texture2"
},
Any guidance I would be very grateful!
Beta Was this translation helpful? Give feedback.
All reactions