[1.11.5] Problem with HLMS PBR on D3D9 Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
FloydPepper
Gnoblar
Posts: 9
Joined: Tue May 22, 2018 1:58 pm
Location: France

[1.11.5] Problem with HLMS PBR on D3D9

Post by FloydPepper » Thu May 02, 2019 9:01 am

Ogre Version: 1.11.5
Operating System: Windows 10
Render System: D3D9

Hello,

I have a problem with the HLMS PBR on Direct 3D 9: whatever roughness value I use for my material, my environment map reflection is always appearing like if the roughness was set to 0. I mean that the reflection of the env map isn't blurred at all (the env map mipmap level used seems to be the one with the highest resolution).

This problem only appears on nVidia cards, no problems with intel intregrated chipset. Also, there is no problem with OpenGL.
I have check the 1.11.6 release notes, but there is no mention of this.

Any ideas of the problem ?

Thank you !
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 774
Joined: Sun Mar 30, 2014 2:51 pm
x 120
Contact:

Re: [1.11.5] Problem with HLMS PBR on D3D9

Post by paroj » Thu May 02, 2019 10:11 pm

the texCUBElod function used here
https://github.com/OGRECave/ogre/blob/v ... #L368-L372

seems not to work correctly with D3D9. The strage thing is that the same shader works fine with D3D11.
0 x

FloydPepper
Gnoblar
Posts: 9
Joined: Tue May 22, 2018 1:58 pm
Location: France

Re: [1.11.5] Problem with HLMS PBR on D3D9

Post by FloydPepper » Fri May 03, 2019 1:24 pm

Thank you for your reply.

That's what I thought. Do you have any idea of a workaround ?
0 x

FloydPepper
Gnoblar
Posts: 9
Joined: Tue May 22, 2018 1:58 pm
Location: France

Re: [1.11.5] Problem with HLMS PBR on D3D9

Post by FloydPepper » Mon May 13, 2019 1:42 pm

I found a solution.
I figured out that the result on each individual face was correct (uses the good mipmap level depending of the roughness). The problem is that these resulting faces do not take into account the neighboring faces.

In fact, it seems that in D3D9 some graphic cards do not support interpolation between the env map faces. So the result of texCUBElod could be different depending of the hardware.

To fix that, there is this tool : https://gpuopen.com/archive/gamescgi/cubemapgen/
It can be used in offline to generate correctly interpolated env maps.
0 x

Post Reply