GFBModel shader fixes/improvements

This commit is contained in:
KillzXGaming 2019-11-23 17:07:31 -05:00
parent 68f9731b98
commit 0571546bb9
3 changed files with 8 additions and 7 deletions

View file

@ -35,7 +35,7 @@ namespace Toolbox.Library.Forms
}
private void chkVertexColors_CheckedChanged(object sender, EventArgs e) {
Settings.UseVertexColors = chkOldExporter.Checked;
Settings.UseVertexColors = chkVertexColors.Checked;
}
}
}

View file

@ -193,7 +193,7 @@ void main()
// Global brightness adjustment.
fragColor.rgb *= 2.5;
fragColor.rgb *= 4.5;
fragColor.rgb *= min(boneWeightsColored, vec3(1));
@ -259,6 +259,8 @@ void main()
fragColor = vec4(diffuseMapColor.rgb, 1);
}
else if (renderType == 4) //Display Normal
fragColor.rgb = texture(NormalMap, displayTexCoord).rgb;
else if (renderType == 5) // vertexColor
fragColor = vertexColor;
else if (renderType == 6) //Display Ambient Occlusion

View file

@ -115,22 +115,21 @@ void main()
vec4 objPos = vec4(vPosition.xyz, 1.0);
if (vBone.x != -1.0)
objPos = skin(vPosition, index);
objPos = skin(objPos.xyz, index);
if(vBone.x != -1.0)
normal = normalize((skinNRM(vNormal.xyz, index)).xyz);
vec4 position = mtxCam * mtxMdl * vec4(objPos.xyz, 1.0);
objPos = mtxMdl * vec4(objPos.xyz, 1.0);
vec4 position = mtxCam * objPos;
normal = vNormal;
vertexColor = vColor;
position = objPos;
f_texcoord0 = vUV0;
f_texcoord1 = vUV1;
f_texcoord2 = vUV2;
tangent = vTangent;
position = mtxCam * mtxMdl * vec4(vPosition.xyz, 1.0);
f_texcoord0.x *= ColorUVScaleU + ColorUVTranslateU;
f_texcoord0.y *= ColorUVScaleV + ColorUVTranslateV;