Skip to content

Commit

Permalink
Fix AMD being GLSL4 incompetent
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Nov 5, 2021
1 parent ae525c5 commit ddec320
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cont/base/springcontent/shaders/GLSL/ModelVertProgGL4.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ out Data {
};
out float gl_ClipDistance[3];

mat4 mat4mix(mat4 a, mat4 b, float alpha) {
return (a * (1.0 - alpha) + b * alpha);
}
#line 1115

void TransformPlayerCam(vec4 worldPos) {
gl_Position = cameraViewProj * worldPos;
Expand All @@ -128,15 +126,11 @@ void TransformPlayerCamStaticMat(vec4 worldPos) {
gl_Position = cameraViewProj * worldPos;
}

mat4 GetPieceMatrix(bool staticModel) {
return mat[instData.x + pieceIndex + uint(!staticModel)];
}

#line 1131
#define GetPieceMatrix(staticModel) (mat[instData.x + pieceIndex + uint(!staticModel)])

void main(void)
{
mat4 pieceMatrix = GetPieceMatrix(drawMode < 0);
mat4 pieceMatrix = GetPieceMatrix(bool(drawMode < 0));
mat4 worldMatrix = (drawMode >= 0) ? mat[instData.x] : staticModelMatrix;
mat4 worldPieceMatrix = worldMatrix * pieceMatrix; // for the below

Expand Down

0 comments on commit ddec320

Please sign in to comment.