diff --git a/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs b/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs index 0a08bed60..c053a1e77 100644 --- a/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs +++ b/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs @@ -162,6 +162,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + + vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; + } + """; } @@ -187,7 +195,7 @@ public static string ReadColorFromTexture( if (!(finTexture?.IsTransform3d ?? false)) { transformedUv = $"({textureName}.transform2d * {rawUvName}).xy"; } else { - transformedUv = $"({textureName}.transform3d * vec4({rawUvName}, 0, 1)).xy"; + transformedUv = $"transformUv3d({textureName}.transform3d, {rawUvName})"; } return $"texture({textureName}.sampler, " + diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002BFD8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002BFD8.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002BFD8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002BFD8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C078.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C078.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C078.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C078.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C118.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C118.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C118.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C118.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C1B8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C1B8.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C1B8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C1B8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C258.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C258.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C258.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C258.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C2F8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C2F8.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C2F8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C2F8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C398.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C398.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C398.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C398.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C438.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C438.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C438.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C438.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C4D8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C4D8.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C4D8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C4D8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C578.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C578.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C578.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C578.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C618.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C618.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C618.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C618.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C6B8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C6B8.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C6B8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C6B8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C758.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C758.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C758.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C758.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C7F8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C7F8.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C7F8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C7F8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C898.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C898.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C898.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C898.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C938.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C938.fragment.glsl index a77f01f08..4c3d0551e 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C938.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C938.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.7019608020782471,0.501960813999176)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C9D8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C9D8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C9D8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002C9D8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CAEC.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CAEC.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CAEC.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CAEC.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CC00.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CC00.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CC00.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CC00.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CD14.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CD14.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CD14.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CD14.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CE28.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CE28.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CE28.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CE28.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CEC8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CEC8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CEC8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CEC8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CF68.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CF68.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CF68.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002CF68.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D07C.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D07C.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D07C.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D07C.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D11C.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D11C.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D11C.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D11C.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D1E8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D1E8.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D1E8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D1E8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D2B4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D2B4.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D2B4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D2B4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D354.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D354.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D354.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D354.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D3F4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D3F4.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D3F4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D3F4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D494.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D494.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D494.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D494.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D534.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D534.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D534.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D534.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D5D4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D5D4.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D5D4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D5D4.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D674.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D674.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D674.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D674.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D714.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D714.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D714.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D714.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D7B4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D7B4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D7B4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D7B4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D854.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D854.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D854.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D854.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D8F4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D8F4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D8F4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D8F4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D994.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D994.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D994.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002D994.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DA34.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DA34.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DA34.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DA34.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DAD4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DAD4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DAD4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DAD4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DB74.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DB74.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DB74.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DB74.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DC14.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DC14.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DC14.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DC14.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DCB4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DCB4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DCB4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DCB4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DD54.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DD54.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DD54.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DD54.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DDF4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DDF4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DDF4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DDF4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DE94.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DE94.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DE94.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DE94.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DF34.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DF34.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DF34.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DF34.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DFD4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DFD4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DFD4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002DFD4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E074.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E074.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E074.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E074.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E114.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E114.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E114.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E114.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E1B4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E1B4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E1B4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E1B4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E254.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E254.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E254.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E254.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E2F4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E2F4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E2F4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E2F4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E394.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E394.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E394.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E394.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E434.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E434.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E434.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E434.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E4D4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E4D4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E4D4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E4D4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E574.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E574.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E574.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E574.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E614.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E614.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E614.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E614.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E6B4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E6B4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E6B4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E6B4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E754.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E754.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E754.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E754.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.fragment.glsl index 3fb6a8dbd..f838999ce 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.7019608020782471,0.7019608020782471,0) + individualLightColors[0].rgb*vec3(1,0.20000000298023224,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.7019608020782471,0.7019608020782471,0) + individualLightColors[0].rgb*vec3(1,0.20000000298023224,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.fragment.glsl index 3fb6a8dbd..f838999ce 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.7019608020782471,0.7019608020782471,0) + individualLightColors[0].rgb*vec3(1,0.20000000298023224,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.7019608020782471,0.7019608020782471,0) + individualLightColors[0].rgb*vec3(1,0.20000000298023224,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.fragment.glsl index 3f208a2e0..9621c3b4f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.9529411792755127,0.8509804010391235,0) + individualLightColors[0].rgb*vec3(0.7019608020782471,0.501960813999176,0)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/TyAndruf.glb b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/TyAndruf.glb index 70f197d9c..2279696e4 100644 Binary files a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/TyAndruf.glb and b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyAndruf/output/TyAndruf.glb differ diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.fragment.glsl index 51ff2eb84..2888d8b57 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -17,7 +25,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B6B8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B6B8.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B6B8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B6B8.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B778.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B778.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B778.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B778.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B818.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B818.fragment.glsl index 05daf78ce..bc8d01b55 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B818.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B818.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,7 +24,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B904.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B904.fragment.glsl index fd91ab50d..1f294ee18 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B904.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B904.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(1,0.7529411911964417,0)*texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = vec3(1,0.7529411911964417,0)*texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B9A4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B9A4.fragment.glsl index f9df041c6..bdf5ea1d9 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B9A4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000B9A4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BA70.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BA70.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BA70.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BA70.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BB3C.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BB3C.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BB3C.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BB3C.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BC34.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BC34.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BC34.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BC34.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BCD4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BCD4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BCD4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BCD4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BD74.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BD74.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BD74.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BD74.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BE14.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BE14.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BE14.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BE14.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BEB4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BEB4.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BEB4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BEB4.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BF54.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BF54.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BF54.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000BF54.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.fragment.glsl index f0a8f0f24..7df63a38f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; @@ -18,7 +26,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*texture(texture1.sampler, clamp(asin((texture1.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture1.clampMin, texture1.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*texture(texture1.sampler, clamp(asin(transformUv3d(texture1.transform3d, normalUv)) / 3.14159 + 0.5, texture1.clampMin, texture1.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C108.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C108.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C108.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C108.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.fragment.glsl index c73fa900f..7810fe5f3 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -17,7 +25,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = vertexColor0.rgb*texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = vertexColor0.rgb*texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C248.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C248.fragment.glsl index f9df041c6..bdf5ea1d9 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C248.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C248.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C2E8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C2E8.fragment.glsl index f9df041c6..bdf5ea1d9 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C2E8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C2E8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C3A8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C3A8.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C3A8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C3A8.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C468.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C468.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C468.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C468.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C508.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C508.fragment.glsl index 05daf78ce..bc8d01b55 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C508.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C508.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,7 +24,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C5F4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C5F4.fragment.glsl index fd91ab50d..1f294ee18 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C5F4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C5F4.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(1,0.7529411911964417,0)*texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = vec3(1,0.7529411911964417,0)*texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C694.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C694.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C694.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C694.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.fragment.glsl index f0a8f0f24..7df63a38f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; @@ -18,7 +26,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*texture(texture1.sampler, clamp(asin((texture1.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture1.clampMin, texture1.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*texture(texture1.sampler, clamp(asin(transformUv3d(texture1.transform3d, normalUv)) / 3.14159 + 0.5, texture1.clampMin, texture1.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C868.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C868.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C868.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C868.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C928.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C928.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C928.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C928.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C9C8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C9C8.fragment.glsl index 05daf78ce..bc8d01b55 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C9C8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000C9C8.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,7 +24,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CAB4.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CAB4.fragment.glsl index fd91ab50d..1f294ee18 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CAB4.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CAB4.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(1,0.7529411911964417,0)*texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = vec3(1,0.7529411911964417,0)*texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CB54.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CB54.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CB54.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CB54.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.fragment.glsl index f0a8f0f24..7df63a38f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; @@ -18,7 +26,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*texture(texture1.sampler, clamp(asin((texture1.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture1.clampMin, texture1.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*texture(texture1.sampler, clamp(asin(transformUv3d(texture1.transform3d, normalUv)) / 3.14159 + 0.5, texture1.clampMin, texture1.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CD28.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CD28.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CD28.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CD28.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CDE8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CDE8.fragment.glsl index 5c1414201..a6440d02f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CDE8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CDE8.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CE88.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CE88.fragment.glsl index 05daf78ce..bc8d01b55 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CE88.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CE88.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,7 +24,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CF74.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CF74.fragment.glsl index fd91ab50d..1f294ee18 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CF74.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000CF74.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; @@ -16,9 +24,9 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(1,0.7529411911964417,0)*texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb; + vec3 colorComponent = vec3(1,0.7529411911964417,0)*texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb; - float alphaComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).a; + float alphaComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).a; fragColor = vec4(colorComponent, alphaComponent); diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000D014.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000D014.fragment.glsl index f1dc18d79..e9523bdb8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000D014.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000D014.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.fragment.glsl index f0a8f0f24..7df63a38f 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; @@ -18,7 +26,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*texture(texture1.sampler, clamp(asin((texture1.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture1.clampMin, texture1.clampMax)).rgb; + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*texture(texture1.sampler, clamp(asin(transformUv3d(texture1.transform3d, normalUv)) / 3.14159 + 0.5, texture1.clampMin, texture1.clampMax)).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/TyBField.glb b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/TyBField.glb index 0c142f8a0..cc35a3a2e 100644 Binary files a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/TyBField.glb and b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBField/output/TyBField.glb differ diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001B80.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001B80.fragment.glsl index cf0a11174..9280243f8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001B80.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001B80.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb*vec3(0.2980392277240753)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb*vec3(0.2980392277240753)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001C20.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001C20.fragment.glsl index cf0a11174..9280243f8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001C20.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001C20.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb*vec3(0.2980392277240753)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb*vec3(0.2980392277240753)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001CC0.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001CC0.fragment.glsl index cf0a11174..9280243f8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001CC0.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001CC0.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb*vec3(0.2980392277240753)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.20000000298023224) + individualLightColors[0].rgb*vec3(0.2980392277240753)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001D60.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001D60.fragment.glsl index d9abc92fe..5bd91c2a3 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001D60.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001D60.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(1) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(1) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001E00.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001E00.fragment.glsl index d9abc92fe..5bd91c2a3 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001E00.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyBancho/output/00001E00.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(1) + individualLightColors[0].rgb); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(1) + individualLightColors[0].rgb); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047938.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047938.fragment.glsl index a06d0c69b..b696a23cd 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047938.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047938.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000479D8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000479D8.fragment.glsl index a06d0c69b..b696a23cd 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000479D8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000479D8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.fragment.glsl index 7e3f93f3f..87d6eb956 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047B38.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047B38.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047B38.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047B38.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047BD8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047BD8.fragment.glsl index a06d0c69b..b696a23cd 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047BD8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047BD8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047C78.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047C78.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047C78.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047C78.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047D18.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047D18.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047D18.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047D18.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047DB8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047DB8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047DB8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047DB8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047E58.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047E58.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047E58.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047E58.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047F18.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047F18.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047F18.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047F18.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047FB8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047FB8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047FB8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047FB8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.fragment.glsl index a37a5b3d4..a348fc53a 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.800000011920929)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.800000011920929)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048118.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048118.fragment.glsl index a06d0c69b..b696a23cd 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048118.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048118.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000481B8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000481B8.fragment.glsl index a06d0c69b..b696a23cd 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000481B8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000481B8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048258.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048258.fragment.glsl index a06d0c69b..b696a23cd 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048258.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048258.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000482F8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000482F8.fragment.glsl index a06d0c69b..b696a23cd 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000482F8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000482F8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.5960784554481506,0.5333333611488342,0.5058823823928833) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048398.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048398.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048398.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048398.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048438.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048438.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048438.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048438.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000484D8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000484D8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000484D8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000484D8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048578.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048578.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048578.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048578.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048618.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048618.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048618.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048618.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000486B8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000486B8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000486B8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000486B8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048758.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048758.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048758.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048758.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000487F8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000487F8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000487F8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000487F8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048898.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048898.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048898.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048898.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048938.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048938.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048938.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048938.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000489D8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000489D8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000489D8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000489D8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048A78.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048A78.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048A78.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048A78.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048B18.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048B18.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048B18.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048B18.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048BB8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048BB8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048BB8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048BB8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048C58.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048C58.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048C58.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048C58.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048CF8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048CF8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048CF8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048CF8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048D98.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048D98.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048D98.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048D98.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048E38.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048E38.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048E38.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048E38.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048ED8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048ED8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048ED8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048ED8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048F78.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048F78.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048F78.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048F78.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049018.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049018.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049018.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049018.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000490B8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000490B8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000490B8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000490B8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049158.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049158.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049158.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049158.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000491F8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000491F8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000491F8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000491F8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049298.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049298.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049298.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049298.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049338.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049338.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049338.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049338.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000493D8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000493D8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000493D8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000493D8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049478.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049478.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049478.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049478.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049518.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049518.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049518.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049518.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000495B8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000495B8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000495B8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000495B8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049658.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049658.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049658.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049658.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000496F8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000496F8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000496F8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000496F8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049798.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049798.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049798.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049798.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049838.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049838.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049838.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049838.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000498F8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000498F8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000498F8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000498F8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000499B8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000499B8.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000499B8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/000499B8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.fragment.glsl index a37a5b3d4..a348fc53a 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.800000011920929)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.800000011920929)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049B38.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049B38.fragment.glsl index 191f73239..0d55a42c8 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049B38.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049B38.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec3 vertexNormal; @@ -44,7 +52,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp((texture0.transform3d * vec4(uv0, 0, 1)).xy, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); + vec3 colorComponent = texture(texture0.sampler, clamp(transformUv3d(texture0.transform3d, uv0), texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.7019608020782471)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.fragment.glsl index a37a5b3d4..a348fc53a 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.800000011920929)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.800000011920929)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.fragment.glsl b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.fragment.glsl index a37a5b3d4..a348fc53a 100644 --- a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.fragment.glsl +++ b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec2 normalUv; @@ -45,7 +53,7 @@ void main() { individualLightColors[i] = lightColor; } - vec3 colorComponent = texture(texture0.sampler, clamp(asin((texture0.transform3d * vec4(normalUv, 0, 1)).xy) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.800000011920929)); + vec3 colorComponent = texture(texture0.sampler, clamp(asin(transformUv3d(texture0.transform3d, normalUv)) / 3.14159 + 0.5, texture0.clampMin, texture0.clampMax)).rgb*(vec3(0.501960813999176) + individualLightColors[0].rgb*vec3(0.800000011920929)); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/TyDaisy.glb b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/TyDaisy.glb index f43684ef7..252df4cbb 100644 Binary files a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/TyDaisy.glb and b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyDaisy/output/TyDaisy.glb differ diff --git a/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyGmCube/input/TyGmCube.dat b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyGmCube/input/TyGmCube.dat new file mode 100644 index 000000000..668866441 Binary files /dev/null and b/FinModelUtility/Formats/Dat/Dat Tests/goldens/super_smash_bros_melee/TyGmCube/input/TyGmCube.dat differ diff --git a/FinModelUtility/Formats/Dat/Dat/src/api/DatModelImporter.cs b/FinModelUtility/Formats/Dat/Dat/src/api/DatModelImporter.cs index 31c011c4e..4232ad21e 100644 --- a/FinModelUtility/Formats/Dat/Dat/src/api/DatModelImporter.cs +++ b/FinModelUtility/Formats/Dat/Dat/src/api/DatModelImporter.cs @@ -5,6 +5,8 @@ using fin.io; using fin.language.equations.fixedFunction; using fin.language.equations.fixedFunction.impl; +using fin.math.matrix.four; +using fin.math.rotations; using fin.model; using fin.model.impl; using fin.model.io.importers; @@ -107,18 +109,41 @@ public IModel ImportModel(DatModelFileBundle modelFileBundle) { var tObjRotationRadians = tObj.RotationRadians; var tObjScale = tObj.Scale; - // TODO: Still isn't working..... + var rawTranslation = new Position( + tObjTranslation.X, + tObjTranslation.Y, + tObjTranslation.Z); + var rawQuaternion = QuaternionUtil.CreateZyx( + tObjRotationRadians.X, + tObjRotationRadians.Y, + tObjRotationRadians.Z); + var rawScale = + new Scale(tObjScale.X, tObjScale.Y, tObjScale.Z); + + // This is an absolute nightmare, but it works. + FinMatrix4x4Util.FromTrs(rawTranslation, + rawQuaternion, + rawScale) + .InvertInPlace() + .Decompose(out var outTranslation, + out var outQuaternion, + out var outScale); + + var outRotationRadians = + QuaternionUtil.ToEulerRadians(outQuaternion); + + finTexture.SetOffset3d( + outTranslation.X, + outTranslation.Y, + outTranslation.Z); finTexture.SetRotationRadians3d( - -tObjTranslation.X, - -tObjTranslation.Y, - -tObjTranslation.Z); - finTexture.SetOffset3d(-tObjRotationRadians.X, - -tObjRotationRadians.Y, - -tObjRotationRadians.Z); + outRotationRadians.X, + outRotationRadians.Y, + outRotationRadians.Z); finTexture.SetScale3d( - tObj.RepeatS / tObjScale.X, - tObj.RepeatT / tObjScale.Y, - 1 / tObjScale.Z); + tObj.RepeatS * outScale.X, + tObj.RepeatT * outScale.Y, + outScale.Z); finTexturesByTObjOffset[tObjOffset] = finTexture; } @@ -211,6 +236,10 @@ public IModel ImportModel(DatModelFileBundle modelFileBundle) { return finModel; } + /// + /// Shamelessly copied from: + /// https://github.com/Ploaj/HSDLib/blob/93a906444f34951c6eed4d8c6172bba43d4ada98/HSDRawViewer/Shader/gx_lightmap.frag + /// private void PopulateFixedFunctionMaterial_( MObj mObj, IReadOnlyList<(TObj, ITexture)> tObjsAndFinTextures, @@ -251,6 +280,7 @@ private void PopulateFixedFunctionMaterial_( var (tObj, _) = tObjsAndFinTextures[i]; var textureColor = equations.CreateOrGetColorInput( FixedFunctionSource.TEXTURE_COLOR_0 + i); + switch (tObj.Flags.GetColorMap()) { case ColorMap.NONE: { // TODO: Is this right? diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/mario_kart_double_dash_babyluigi_course/output/bb_merry_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/mario_kart_double_dash_babyluigi_course/output/bb_merry_v.fragment.glsl index 8e6e54dcd..333267d89 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/mario_kart_double_dash_babyluigi_course/output/bb_merry_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/mario_kart_double_dash_babyluigi_course/output/bb_merry_v.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform vec3 color_GxMaterialColor0; uniform float scalar_GxMaterialAlpha0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/mario_kart_double_dash_babyluigi_course/output/bb_sc_pata_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/mario_kart_double_dash_babyluigi_course/output/bb_sc_pata_v.fragment.glsl index 25092f7ab..126575ef8 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/mario_kart_double_dash_babyluigi_course/output/bb_sc_pata_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/mario_kart_double_dash_babyluigi_course/output/bb_sc_pata_v.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.fragment.glsl index 9449a7ae1..ca62c3731 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture2; uniform Texture texture3; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/body_mat.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/body_mat.fragment.glsl index 9449a7ae1..ca62c3731 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/body_mat.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/body_mat.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture2; uniform Texture texture3; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/tama_mat.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/tama_mat.fragment.glsl index 73813f741..00bd254e7 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/tama_mat.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_BigFoot/output/tama_mat.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture2; uniform Texture texture3; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_BackGround_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_BackGround_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_BackGround_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_BackGround_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_koke_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_koke_v.fragment.glsl index 5d55209ae..d596449ad 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_koke_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_koke_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_kusa_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_kusa_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_kusa_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_kusa_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_tuchi_nure_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_tuchi_nure_v.fragment.glsl index 25088b74a..8769d7e15 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_tuchi_nure_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_tuchi_nure_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_tuchi_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_tuchi_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_tuchi_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Ground_tuchi_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Hachi_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Hachi_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Hachi_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Hachi_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Rock_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Rock_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Rock_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_Rock_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_iron_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_iron_v.fragment.glsl index b09b3a37e..29807e6ce 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_iron_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_iron_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; uniform Texture texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_iron_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_iron_v_x.fragment.glsl index e88b16996..8625c1b6b 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_iron_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_iron_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_kabe02_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_kabe02_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_kabe02_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_kabe02_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_kusa_tuchi_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_kusa_tuchi_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_kusa_tuchi_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_kusa_tuchi_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_plate_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_plate_v.fragment.glsl index 2b03023ba..0208fd3ac 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_plate_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_plate_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform Texture texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_take_re_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_take_re_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_take_re_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_take_re_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_take_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_take_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_take_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_take_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_tsumiishi_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_tsumiishi_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_tsumiishi_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_tsumiishi_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood01_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood01_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood01_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood01_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood02_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood02_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood02_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood02_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood06_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood06_v.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood06_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/a_wood06_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Ground_tuchi_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Ground_tuchi_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Ground_tuchi_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Ground_tuchi_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hant_Ground_koke_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hant_Ground_koke_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hant_Ground_koke_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hant_Ground_koke_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_Ground_kusa_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_Ground_kusa_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_Ground_kusa_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_Ground_kusa_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_Ground_tuchi_nure_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_Ground_tuchi_nure_v_x.fragment.glsl index ddb273edb..80e01231b 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_Ground_tuchi_nure_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_Ground_tuchi_nure_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_kabe02_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_kabe02_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_kabe02_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Hanto_kabe02_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Niki_kusaHashi_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Niki_kusaHashi_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Niki_kusaHashi_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Niki_kusaHashi_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_Rock_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_Rock_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_Rock_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_Rock_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_circle.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_circle.fragment.glsl index e5f666fa4..5bbba1620 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_circle.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_circle.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa01_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa01_v.fragment.glsl index d6c2baca7..0b764fd5e 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa01_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa01_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa04_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa04_v.fragment.glsl index d6c2baca7..0b764fd5e 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa04_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa04_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa05_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa05_v.fragment.glsl index d6c2baca7..0b764fd5e 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa05_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa05_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa06_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa06_v.fragment.glsl index d6c2baca7..0b764fd5e 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa06_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_kusa06_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.fragment.glsl index dcf66c3fe..a711c0d28 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform sampler2D texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_wood01_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_wood01_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_wood01_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_wood01_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_wood06_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_wood06_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_wood06_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_Nuki_wood06_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_hanabira_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_hanabira_v.fragment.glsl index 7eaa71538..b5afd0a66 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_hanabira_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_hanabira_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_hikari_v.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_hikari_v.fragment.glsl index 5063c1586..b33408c70 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_hikari_v.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_hikari_v.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform Texture texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_kusa_tuchi_v_x.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_kusa_tuchi_v_x.fragment.glsl index 07ee86a69..26105b6e9 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_kusa_tuchi_v_x.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_forest/output/w_kusa_tuchi_v_x.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform sampler2D texture0; uniform Texture texture1; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/body.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/body.fragment.glsl index 6622e5cf3..1a8bfd839 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/body.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/body.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform sampler2D texture1; uniform sampler2D texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.fragment.glsl index 0d3e2d040..afb4580ca 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform vec3 color_GxMaterialColor0; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/light_blue_r1.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/light_blue_r1.fragment.glsl index 3d6c38f0e..a87b12764 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/light_blue_r1.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/pikmin_2_ufo/output/light_blue_r1.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; uniform Texture texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Corona.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Corona.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Corona.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Corona.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_DistDolpic.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_DistDolpic.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_DistDolpic.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_DistDolpic.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Green_01_Slop(2).fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Green_01_Slop(2).fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Green_01_Slop(2).fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Green_01_Slop(2).fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Green_01_Slop.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Green_01_Slop.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Green_01_Slop.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Green_01_Slop.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_IwaGreen3tev_Slop.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_IwaGreen3tev_Slop.fragment.glsl index b52d4b958..5041a3977 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_IwaGreen3tev_Slop.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_IwaGreen3tev_Slop.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_IwakabeWhite3tev.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_IwakabeWhite3tev.fragment.glsl index b52d4b958..5041a3977 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_IwakabeWhite3tev.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_IwakabeWhite3tev.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Rico.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Rico.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Rico.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Rico.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_RockGround.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_RockGround.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_RockGround.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_RockGround.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_SubwruMIzu1_NureMask.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_SubwruMIzu1_NureMask.fragment.glsl index 4eb599288..0a5f9f7f8 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_SubwruMIzu1_NureMask.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_SubwruMIzu1_NureMask.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform vec3 color_GxMaterialColor0; uniform float scalar_GxMaterialAlpha0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_UnderWater_1.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_UnderWater_1.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_UnderWater_1.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_UnderWater_1.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteRoad_01_Slop(2).fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteRoad_01_Slop(2).fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteRoad_01_Slop(2).fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteRoad_01_Slop(2).fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteRoad_01_Slop.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteRoad_01_Slop.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteRoad_01_Slop.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteRoad_01_Slop.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteWall_02_wall(2).fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteWall_02_wall(2).fragment.glsl index b52d4b958..5041a3977 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteWall_02_wall(2).fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteWall_02_wall(2).fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteWall_02_wall.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteWall_02_wall.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteWall_02_wall.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_WhiteWall_02_wall.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Windmillwall_Kakine.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Windmillwall_Kakine.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Windmillwall_Kakine.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_Windmillwall_Kakine.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_Rico.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_Rico.fragment.glsl index 25092f7ab..126575ef8 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_Rico.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_Rico.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_Roof2.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_Roof2.fragment.glsl index 25092f7ab..126575ef8 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_Roof2.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_Roof2.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_houseT1.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_houseT1.fragment.glsl index 25092f7ab..126575ef8 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_houseT1.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_houseT1.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_houseT4.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_houseT4.fragment.glsl index 25092f7ab..126575ef8 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_houseT4.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutOut_houseT4.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutout_1cUpRSide_Slop(2).fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutout_1cUpRSide_Slop(2).fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutout_1cUpRSide_Slop(2).fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutout_1cUpRSide_Slop(2).fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutout_1cUpRSide_Slop.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutout_1cUpRSide_Slop.fragment.glsl index 25092f7ab..126575ef8 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutout_1cUpRSide_Slop.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_ZPutout_1cUpRSide_Slop.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_kage_02_Wall.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_kage_02_Wall.fragment.glsl index 8478811e9..da30e7490 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_kage_02_Wall.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_kage_02_Wall.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform vec3 color_GxColor2; uniform float scalar_GxAlpha2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_merikomi_02_Wall(2).fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_merikomi_02_Wall(2).fragment.glsl index 25092f7ab..126575ef8 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_merikomi_02_Wall(2).fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_merikomi_02_Wall(2).fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_merikomi_02_Wall(3).fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_merikomi_02_Wall(3).fragment.glsl index 8478811e9..da30e7490 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_merikomi_02_Wall(3).fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_merikomi_02_Wall(3).fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform vec3 color_GxColor2; uniform float scalar_GxAlpha2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_roof3.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_roof3.fragment.glsl index 761241326..cdd77abeb 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_roof3.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_bianco0_map/output/_roof3.fragment.glsl @@ -8,6 +8,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; in vec4 vertexColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_fisha/output/_eye.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_fisha/output/_eye.fragment.glsl index 401f14d36..c5eb6bfca 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_fisha/output/_eye.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_fisha/output/_eye.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform vec3 color_GxAmbientColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_eye_mat.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_eye_mat.fragment.glsl index 9cca577e8..e953c62b4 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_eye_mat.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_eye_mat.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform sampler2D texture1; uniform vec3 color_GxMaterialColor0; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_body.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_body.fragment.glsl index 73bdf7a82..84502d1d0 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_body.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_body.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; uniform Texture texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_cap.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_cap.fragment.glsl index 3bf4e3008..1d5351f6d 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_cap.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_cap.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; uniform Texture texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_cloth.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_cloth.fragment.glsl index 88db9405f..333ae358c 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_cloth.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_cloth.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; uniform Texture texture2; diff --git a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_mouth.fragment.glsl b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_mouth.fragment.glsl index 73bdf7a82..84502d1d0 100644 --- a/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_mouth.fragment.glsl +++ b/FinModelUtility/Formats/J3d/J3d Tests/goldens/super_mario_sunshine_kinopio/output/_mat_mouth.fragment.glsl @@ -18,6 +18,14 @@ struct Texture { mat2x3 transform2d; mat4 transform3d; }; + +vec2 transformUv3d(mat4 transform3d, vec2 inUv) { + vec4 rawTransformedUv = (transform3d * vec4(inUv, 0, 1)); + + // We need to manually divide by w for perspective correction! + return rawTransformedUv.xy / rawTransformedUv.w; +} + uniform Texture texture0; uniform Texture texture1; uniform Texture texture2;