Welcome, Guest.
Username: Password: Remember me

TOPIC: [SOLVED] MasterEffect OpenGL matrix swizzeling problem

MasterEffect ReBorn official thread 1 year 10 months ago #1

  • Mikan
  • Mikan's Avatar
  • Offline
  • Posts: 14
  • Thank you received: 13
Hi again^^
Amnesia the Dark Decent would not accept this part of SSAOgen, not sure why.. code looks good and work on other games :huh:
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: 1 year 10 months ago by Mikan. Reason: Oops :P
The administrator has disabled public write access.

MasterEffect ReBorn official thread 1 year 10 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2453
  • Thank you received: 1393
Mikan wrote:
Hi again^^
Amnesia the Dark Decent would not accept this part of SSAOgen, not sure why.. code looks good and work on other games :huh:
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). =)
Cheers, crosire =)
The administrator has disabled public write access.

MasterEffect ReBorn official thread 1 year 10 months ago #3

  • Mikan
  • Mikan's Avatar
  • Offline
  • Posts: 14
  • Thank you received: 13
crosire wrote:
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 :ohmy:
Trying to learn myself. :blush: Looking forward to new updates^^
The administrator has disabled public write access.