Hi all!
It seems that the specular cubemap is inverted into the shader.
As you can see on the screenshot we inverted our env to match it.
Tnx
Specular cubemap inverted?
- miki3d
- Halfling
- Posts: 56
- Joined: Wed Jul 18, 2012 1:30 pm
- Location: Italy
- x 4
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 168
Re: Specular cubemap inverted?
yes it is... I solved this problem by doing this:
I think this should be fixed in another way, maybe "invViewMatCubemap" is incorrect?
Code: Select all
....
vec3 cubeMapCoord = reflDir * pass.invViewMatCubemap;
cubeMapCoord.z = -cubeMapCoord.z;
vec3 envColourS = textureLod( texEnvProbeMap, cubeMapCoord,....
- dark_sylinc
- OGRE Team Member
- Posts: 5299
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1280
- Contact:
Re: Specular cubemap inverted?
The most efficient way is to flip the sign of invViewMatrix3.m[2][0], invViewMatrix3.m[2][1] & invViewMatrix3.m[2][2] in OgreHlmsPbs.cppxrgo wrote:I think this should be fixed in another way, maybe "invViewMatCubemap" is incorrect?
If it looks bad, then what I told you was wrong, and you have to flip the sign of invViewMatrix3.m[0][2], invViewMatrix3.m[1][2] & invViewMatrix3.m[2][2]. I always confuse row and column major order.