Open cryham opened 10 months ago
Mmm, very interesting.
I can guess what's happening already without running it: The JPG was saved as greyscale, thus OgreNext detects this and loads it as R8_UNORM to save memory.
So when used as a specular map, sampling texture.xyzw will return R 0 0 1
as per how the HW works.
One simple workaround is to convert the JPG to rgb. Ideally OgreNext should detect this and use a different swizzle.
Ah thanks. I had no idea. Indeed saving as RGB fixed this red. In GIMP from menu Image > Mode. Info from https://www.picozu.com/how-to-convert-a-grayscale-image-to-rgb-in-gimp So leaving this open for change in OgreNext then.
Ogre Version: :3.0 Operating System / Platform: Debian 12 RenderSystem: GL3+ GPU: AMD Radeon RX 6600 XT (navi23, LLVM 15.0.6, DRM 3.49, 6.1.0-13-amd64)
IDK why but for my recent new meshes exported, I get red only specular, ignoring specular map. If I don't use specular map it's white again. That barrel is old, converted from old v1 .mesh rest is new with red specular issue.
material.json in here, log_cabin_01: https://github.com/stuntrally/stuntrally3/blob/main/data/materials/Pbs/all.material.json#L23805
meshes, textures in: https://github.com/stuntrally/stuntrally3/tree/main/data/objects2 log_cabin_01.jpg log_cabin_01.mesh log_cabin_01_norm.jpg log_cabin_01_spec.jpg log_cabin_02.mesh
blend files https://github.com/stuntrally/blendfiles/tree/master/models/LogCabin01