- Posts: 14
[SOLVED] MasterEffect OpenGL matrix swizzeling problem
- Mikan
-
Topic Author
- Offline
Less More
7 years 4 months ago - 7 years 4 months ago #1 by Mikan
MasterEffect ReBorn official thread was created by Mikan
Hi again^^
Amnesia the Dark Decent would not accept this part of SSAOgen, not sure why.. code looks good and work on other games
Changed it to this one and it worked fine and should do same I think. Tested with both Amnesia and Borderlands 2 ^^
Amnesia the Dark Decent would not accept this part of SSAOgen, not sure why.. code looks good and work on other games

float3x3 matRotate;
float hao = 1.0f / (1.0f + vRotation.z);
matRotate._m00 = hao * vRotation.y * vRotation.y + vRotation.z;
matRotate._m01 = -hao * vRotation.y * vRotation.x;
matRotate._m02 = -vRotation.x;
matRotate._m10 = -hao * vRotation.y * vRotation.x;
matRotate._m11 = hao * vRotation.x * vRotation.x + vRotation.z;
matRotate._m12 = -vRotation.y;
matRotate._m20 = vRotation.x;
matRotate._m21 = vRotation.y;
matRotate._m22 = vRotation.z;
Changed it to this one and it worked fine and should do same I think. Tested with both Amnesia and Borderlands 2 ^^
float hao = 1.0f / (1.0f + vRotation.z);
float3x3 matRotate = float3x3(float3( hao * vRotation.y * vRotation.y + vRotation.z,
-hao * vRotation.y * vRotation.x, -vRotation.x ),
float3( -hao * vRotation.y * vRotation.x,
hao * vRotation.x * vRotation.x + vRotation.z, -vRotation.y ),
float3( vRotation.x, vRotation.y, vRotation.z) );
Last edit: 7 years 4 months ago by Mikan. Reason: Oops :P
Please Log in or Create an account to join the conversation.
- crosire
-
- Away
Less More
- Posts: 3987
7 years 4 months ago #2 by crosire
Replied by crosire on topic MasterEffect ReBorn official thread
Hi again^^That's a bug in the current ReShade to GLSL compiler, where I erroneously asumed GLSL supports matrix swizzeling (which actually works on NVIDIA). Fixed in the next version, where it generates working code again. Workaround for now is to use the array operator or the constructor directly (like you did). =)
Amnesia the Dark Decent would not accept this part of SSAOgen, not sure why.. code looks good and work on other games
Please Log in or Create an account to join the conversation.
- Mikan
-
Topic Author
- Offline
Less More
- Posts: 14
7 years 4 months ago #3 by Mikan
The amount code you guys are keeping track on most be quite a lot
Trying to learn myself.
Looking forward to new updates^^
Replied by Mikan on topic MasterEffect ReBorn official thread
That's a bug in the current ReShade to GLSL compiler, where I erroneously asumed GLSL supports matrix swizzeling (which actually works on NVIDIA). Fixed in the next version, where it generates working code again. Workaround for now is to use the array operator or the constructor directly (like you did). =)
The amount code you guys are keeping track on most be quite a lot

Trying to learn myself.

Please Log in or Create an account to join the conversation.