[2.1]hdr texture is not supported?

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
renyingzhi1006043
Gnoblar
Posts: 23
Joined: Wed May 03, 2017 4:12 am

[2.1]hdr texture is not supported?

Post by renyingzhi1006043 »

I use hdr texture on hlms material in Ogre 2.1,But texture display is incorrect!
Does anyone know why?
thanks!
User avatar
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?

Post by Zonder »

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...
renyingzhi1006043
Gnoblar
Posts: 23
Joined: Wed May 03, 2017 4:12 am

Re: [2.1]hdr texture is not supported?

Post by renyingzhi1006043 »

I'm sorry.
use hdr texture in scene
hdrtexture
hdrtexture
use dds texture as PF_FLOAT16_RGBA format
ddsTexture
ddsTexture
Is it minmap's problem?
User avatar
dark_sylinc
OGRE Team Member
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?

Post by dark_sylinc »

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...?
  • The 1st picture is PF_FLOAT16_RGBA
  • The 2nd pictures is not (probably BC1/DXT1 or RGBA8888)
Is that correct?

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).
Post Reply