[13.5.3] PBR cubic texture issue under Direct3D9

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
CuriousMike
Gnoblar
Posts: 3
Joined: Thu Dec 01, 2022 4:47 am

[13.5.3] PBR cubic texture issue under Direct3D9

Post by CuriousMike »

Ogre Version: 13.5.3
Operating System: Windows 10, version 21H2
Render System: Direct3D9

Hi,

I've recently been trying to get the PBR shader from the ""DamagedHelmet" sample working in Rigs of Rods.

With OpenGL, the shader works perfectly:

Image

With Direct3D9 however, it looks like this:

Image

The same result you get when disabling "Image-based rendering" in the sample.

Log shows the following errors:

Code: Select all

23:12:58: Error: loading texture 'diffuse.jpg'. Texture layer will be blank: Error creating texture: Invalid call
23:12:58: Error: loading texture 'specular.jpg'. Texture layer will be blank: Error creating texture: Invalid call

After doing some experimenting with the shader files I was convinced the shader just didn't work under DX9.. until I tried displaying the mesh using ogre-meshviewer (https://github.com/OGRECave/ogre-meshviewer/). The newest release (22.11) has the same problem under DX9:

Image

In version 22.02 (using Ogre 13.3) however, it works perfectly under Direct3D9:

Image

The next release (22.06) with Ogre 13.4 introduces this issue.

Oddly enough, in the SampleBrowser the helmet renders the same in all rendering systems. That's why I'm not sure if this is a bug with Ogre or it's just something I'm doing wrong.

Thanks

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

Re: [13.5.3] PBR cubic texture issue under Direct3D9

Post by paroj »

this was fixed with 13.5.3, make sure RoR is actually using that version

User avatar
CuriousMike
Gnoblar
Posts: 3
Joined: Thu Dec 01, 2022 4:47 am

Re: [13.5.3] PBR cubic texture issue under Direct3D9

Post by CuriousMike »

paroj wrote: Thu Dec 01, 2022 2:53 pm

this was fixed with 13.5.3, make sure RoR is actually using that version

Our latest gh-actions test build (https://github.com/RigsOfRods/rigs-of-r ... 3585791217) is using 13.5.3:

Code: Select all

11:21:22: *-*-* OGRE Initialising
11:21:22: *-*-* Version 13.5.3 (Tsathoggua)

Just to make sure, I built RoR against 13.5.3 myself and the problem is still present there as well.

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

Re: [13.5.3] PBR cubic texture issue under Direct3D9

Post by paroj »

just rebuilt meshviewer with 13.5.3 and it works:
https://github.com/OGRECave/ogre-meshvi ... kage.sh#L9

User avatar
CuriousMike
Gnoblar
Posts: 3
Joined: Thu Dec 01, 2022 4:47 am

Re: [13.5.3] PBR cubic texture issue under Direct3D9

Post by CuriousMike »

Thanks for testing! Turns out the issue was caused by the cubemap textures being JPG images. Converted them all to DXT1 DDS files and now everything is working.

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

Re: [13.5.3] PBR cubic texture issue under Direct3D9

Post by paroj »

jpg images should work too - as long as they follow the naming convention described here:
https://ogrecave.github.io/ogre/api/lat ... otoc_md163

Post Reply