mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-26 14:30:26 +00:00
GFBModel shader fixes/improvements
This commit is contained in:
parent
68f9731b98
commit
0571546bb9
3 changed files with 8 additions and 7 deletions
|
@ -35,7 +35,7 @@ namespace Toolbox.Library.Forms
|
||||||
}
|
}
|
||||||
|
|
||||||
private void chkVertexColors_CheckedChanged(object sender, EventArgs e) {
|
private void chkVertexColors_CheckedChanged(object sender, EventArgs e) {
|
||||||
Settings.UseVertexColors = chkOldExporter.Checked;
|
Settings.UseVertexColors = chkVertexColors.Checked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ void main()
|
||||||
|
|
||||||
|
|
||||||
// Global brightness adjustment.
|
// Global brightness adjustment.
|
||||||
fragColor.rgb *= 2.5;
|
fragColor.rgb *= 4.5;
|
||||||
|
|
||||||
fragColor.rgb *= min(boneWeightsColored, vec3(1));
|
fragColor.rgb *= min(boneWeightsColored, vec3(1));
|
||||||
|
|
||||||
|
@ -259,6 +259,8 @@ void main()
|
||||||
|
|
||||||
fragColor = vec4(diffuseMapColor.rgb, 1);
|
fragColor = vec4(diffuseMapColor.rgb, 1);
|
||||||
}
|
}
|
||||||
|
else if (renderType == 4) //Display Normal
|
||||||
|
fragColor.rgb = texture(NormalMap, displayTexCoord).rgb;
|
||||||
else if (renderType == 5) // vertexColor
|
else if (renderType == 5) // vertexColor
|
||||||
fragColor = vertexColor;
|
fragColor = vertexColor;
|
||||||
else if (renderType == 6) //Display Ambient Occlusion
|
else if (renderType == 6) //Display Ambient Occlusion
|
||||||
|
|
|
@ -115,22 +115,21 @@ void main()
|
||||||
|
|
||||||
vec4 objPos = vec4(vPosition.xyz, 1.0);
|
vec4 objPos = vec4(vPosition.xyz, 1.0);
|
||||||
if (vBone.x != -1.0)
|
if (vBone.x != -1.0)
|
||||||
objPos = skin(vPosition, index);
|
objPos = skin(objPos.xyz, index);
|
||||||
if(vBone.x != -1.0)
|
if(vBone.x != -1.0)
|
||||||
normal = normalize((skinNRM(vNormal.xyz, index)).xyz);
|
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;
|
normal = vNormal;
|
||||||
vertexColor = vColor;
|
vertexColor = vColor;
|
||||||
position = objPos;
|
|
||||||
f_texcoord0 = vUV0;
|
f_texcoord0 = vUV0;
|
||||||
f_texcoord1 = vUV1;
|
f_texcoord1 = vUV1;
|
||||||
f_texcoord2 = vUV2;
|
f_texcoord2 = vUV2;
|
||||||
tangent = vTangent;
|
tangent = vTangent;
|
||||||
|
|
||||||
position = mtxCam * mtxMdl * vec4(vPosition.xyz, 1.0);
|
|
||||||
|
|
||||||
f_texcoord0.x *= ColorUVScaleU + ColorUVTranslateU;
|
f_texcoord0.x *= ColorUVScaleU + ColorUVTranslateU;
|
||||||
f_texcoord0.y *= ColorUVScaleV + ColorUVTranslateV;
|
f_texcoord0.y *= ColorUVScaleV + ColorUVTranslateV;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue