1
0
mirror of synced 2024-11-12 10:10:50 +01:00

Attempt to fix UV scale issue with a flag in the shader options

This commit is contained in:
KillzXGaming 2019-03-24 14:40:29 -04:00
parent f9d33324ce
commit 5e4313c54f
7 changed files with 13 additions and 2 deletions

Binary file not shown.

View File

@ -814,6 +814,9 @@ namespace FirstPlugin
shader.SetVector3("emission_color", new Vector3(1, 1, 1));
shader.SetVector3("specular_color", new Vector3(1, 1, 1));
shader.SetFloat("fuv1_mtx", 0);
//SRT
shader.SetVector4("tex_mtx0", new Vector4(1, 1, 1, 1));
shader.SetVector2("SRT_Scale", new Vector2(1, 1));
@ -823,11 +826,14 @@ namespace FirstPlugin
shader.SetInt("selectedBoneIndex", Runtime.SelectedBoneIndex);
SetUniformData(mat, shader, "base_color_mul_color");
shader.SetInt("enableCellShading", 0);
bool HasTans = m.vertexAttributes.Any(x => x.Name == "_t0");
shader.SetBoolToInt("hasTangents", HasTans);
SetUniformData(mat, shader, "fuv1_mtx");
SetUniformData(mat, shader, "gsys_bake_st0");
SetUniformData(mat, shader, "gsys_bake_st1");

View File

@ -5,6 +5,9 @@ uniform mat4 mtxMdl;
uniform mat4 sphereMatrix;
uniform mat4 previewScale;
//This may not be correct, however any SRT used with this flag is used for special effects not supported yet!
uniform float fuv1_mtx;
in vec3 vPosition;
in vec3 vNormal;
in vec3 vTangent;
@ -174,8 +177,10 @@ void main()
else
f_texcoord2 = vec2((vUV1 * vec2(1)) + sampler3.zw);
f_texcoord0 = vec2((vUV0 * SRT_Scale.xy) + SRT_Translate.xy);
if (fuv1_mtx != 1)
{
f_texcoord0 = vec2((vUV0 * SRT_Scale.xy) + SRT_Translate.xy);
}
f_texcoord3 = vUV2;