I use hdr texture on hlms material in Ogre 2.1,But texture display is incorrect!
Does anyone know why?
thanks!
[2.1]hdr texture is not supported?
-
- Gnoblar
- Posts: 23
- Joined: Wed May 03, 2017 4:12 am
- Zonder
- Ogre Magi
- Posts: 1168
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 73
Re: [2.1]hdr texture is not supported?
A picture is worth a thousand words
There are 10 types of people in the world: Those who understand binary, and those who don't...
-
- Gnoblar
- Posts: 23
- Joined: Wed May 03, 2017 4:12 am
Re: [2.1]hdr texture is not supported?
I'm sorry.
use hdr texture in scene use dds texture as PF_FLOAT16_RGBA format Is it minmap's problem?
use hdr texture in scene use dds texture as PF_FLOAT16_RGBA format Is it minmap's problem?
- dark_sylinc
- OGRE Team Member
- Posts: 5299
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1280
- Contact:
Re: [2.1]hdr texture is not supported?
Looks like a gamma correction (sRGB) problem.
The 2nd picture looks like correctly using sRGB; while the 1st one looks like it isn't.
I'm a little confused though. I assume you meant that...?
GPUs support automatic gamma conversion for BC1 and RGBA8888 formats, but not for other formats (such as FLOAT16_RGBA).
Therefore you need to convert it to linear format and store it that way. Whatever tool you're using to store/convert the textures, checkout if it has a gamma correction / sRGB option (or just apply a gamma filter and set gamma to 0,454545455 which is a good approximation to sRGB).
The 2nd picture looks like correctly using sRGB; while the 1st one looks like it isn't.
I'm a little confused though. I assume you meant that...?
- The 1st picture is PF_FLOAT16_RGBA
- The 2nd pictures is not (probably BC1/DXT1 or RGBA8888)
GPUs support automatic gamma conversion for BC1 and RGBA8888 formats, but not for other formats (such as FLOAT16_RGBA).
Therefore you need to convert it to linear format and store it that way. Whatever tool you're using to store/convert the textures, checkout if it has a gamma correction / sRGB option (or just apply a gamma filter and set gamma to 0,454545455 which is a good approximation to sRGB).