diff --git a/FinModelUtility/Fin/Fin/src/language/equations/fixedFunction/FixedFunctionEquationsGlslPrinter.cs b/FinModelUtility/Fin/Fin/src/language/equations/fixedFunction/FixedFunctionEquationsGlslPrinter.cs index b7a61e0bb..581c8f95a 100644 --- a/FinModelUtility/Fin/Fin/src/language/equations/fixedFunction/FixedFunctionEquationsGlslPrinter.cs +++ b/FinModelUtility/Fin/Fin/src/language/equations/fixedFunction/FixedFunctionEquationsGlslPrinter.cs @@ -832,14 +832,12 @@ private string GetTextureValue_(int textureIndex, => GlslUtil.ReadColorFromTexture( textureName, GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME, - uv => $"asin({uv}) / 3.14159 + 0.5", texture, this.animations_), UvType.LINEAR => GlslUtil.ReadColorFromTexture( textureName, GlslConstants.IN_LINEAR_REFLECTION_UV_NAME, - uv => $"acos({uv}) / 3.14159", texture, this.animations_), }; diff --git a/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs b/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs index 37f36ce1f..1ba331204 100644 --- a/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs +++ b/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs @@ -163,10 +163,10 @@ void main() { binormal = cross(vertexNormal, tangent);"); if (shaderRequirements.UsesSphericalReflectionMapping) { - vertexSrc.AppendLine($" {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME} = normalize(projectionVertexModelMatrix * vec4(in_Normal, 0)).xy;"); + vertexSrc.AppendLine($" {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME} = asin(normalize(projectionVertexModelMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5;"); } if (shaderRequirements.UsesLinearReflectionMapping) { - vertexSrc.AppendLine($" {GlslConstants.IN_LINEAR_REFLECTION_UV_NAME} = normalize(projectionVertexModelMatrix * vec4(in_Normal, 0)).xy;"); + vertexSrc.AppendLine($" {GlslConstants.IN_LINEAR_REFLECTION_UV_NAME} = acos(normalize(projectionVertexModelMatrix * vec4(in_Normal, 0)).xy) / 3.14159;"); } } else { vertexSrc.AppendLine($@" @@ -176,10 +176,10 @@ void main() { binormal = cross(vertexNormal, tangent);"); if (shaderRequirements.UsesSphericalReflectionMapping) { - vertexSrc.AppendLine($" {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME} = normalize(mvpMatrix * vec4(in_Normal, 0)).xy;"); + vertexSrc.AppendLine($" {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME} = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5;"); } if (shaderRequirements.UsesLinearReflectionMapping) { - vertexSrc.AppendLine($" {GlslConstants.IN_LINEAR_REFLECTION_UV_NAME} = normalize(mvpMatrix * vec4(in_Normal, 0)).xy;"); + vertexSrc.AppendLine($" {GlslConstants.IN_LINEAR_REFLECTION_UV_NAME} = acos(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159;"); } } @@ -429,34 +429,22 @@ public static string GetTypeOfTexture( public static string ReadColorFromTexture( string textureName, - string rawUvName, - IReadOnlyTexture? finTexture, - IReadOnlyList animations) - => ReadColorFromTexture(textureName, - rawUvName, - t => t, - finTexture, - animations); - - public static string ReadColorFromTexture( - string textureName, - string rawUvName, - Func uvConverter, + string uvName, IReadOnlyTexture? finTexture, IReadOnlyList animations) { var needsClamp = finTexture.UsesShaderClamping(); var textureTransformType = finTexture.GetTextureTransformType_(animations); if (!needsClamp && textureTransformType == TextureTransformType.NONE) { - return $"texture({textureName}, {uvConverter(rawUvName)})"; + return $"texture({textureName}, {uvName})"; } var transformedUv = textureTransformType switch { TextureTransformType.TWO_D => - $"{textureName}.transform2d * vec3(({uvConverter(rawUvName)}).x, ({uvConverter(rawUvName)}).y, 1)", + $"{textureName}.transform2d * vec3(({uvName}).x, ({uvName}).y, 1)", TextureTransformType.THREE_D => - $"transformUv3d({textureName}.transform3d, {uvConverter(rawUvName)})", - _ => uvConverter(rawUvName) + $"transformUv3d({textureName}.transform3d, {uvName})", + _ => uvName }; if (needsClamp) { diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material0.fragment.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material0.fragment.glsl index 4c6af7295..c17bd7a30 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material0.fragment.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material0.fragment.glsl @@ -136,7 +136,7 @@ void main() { vec3 colorComponent = clamp(texture(texture1, uv0).rgb*mergedLightSpecularColor.rgb*vec3(1.4980392158031464) + clamp((ambientLightColor.rgb*vec3(0.800000011920929) + mergedLightDiffuseColor.rgb)*texture(texture1, uv0).rgb, 0, 1), 0, 1); - float alphaComponent = (vertexColor0.a*texture(texture2, asin(sphericalReflectionUv) / 3.14159 + 0.5).a + scalar_3dsAlpha0)*scalar_3dsAlpha1; + float alphaComponent = (vertexColor0.a*texture(texture2, sphericalReflectionUv).a + scalar_3dsAlpha0)*scalar_3dsAlpha1; fragColor = vec4(colorComponent, alphaComponent); } diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material0.vertex.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material0.vertex.glsl index 9c8d5482b..bbfb47387 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material0.vertex.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material0.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material2.fragment.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material2.fragment.glsl index 018f81acb..34df07d96 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material2.fragment.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material2.fragment.glsl @@ -136,7 +136,7 @@ void main() { vec3 colorComponent = clamp(texture(texture1, uv0).rgb*mergedLightSpecularColor.rgb*vec3(2) + clamp((ambientLightColor.rgb*vec3(0.800000011920929) + mergedLightDiffuseColor.rgb)*texture(texture1, uv0).rgb, 0, 1), 0, 1); - float alphaComponent = (vertexColor0.a*texture(texture2, asin(sphericalReflectionUv) / 3.14159 + 0.5).a + scalar_3dsAlpha0)*scalar_3dsAlpha1; + float alphaComponent = (vertexColor0.a*texture(texture2, sphericalReflectionUv).a + scalar_3dsAlpha0)*scalar_3dsAlpha1; fragColor = vec4(colorComponent, alphaComponent); } diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material2.vertex.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material2.vertex.glsl index 9c8d5482b..bbfb47387 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material2.vertex.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/bfire/output/material2.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/opdn/output/material2.fragment.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/opdn/output/material2.fragment.glsl index 74efeba6f..6f654f96b 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/opdn/output/material2.fragment.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/opdn/output/material2.fragment.glsl @@ -136,7 +136,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = clamp(clamp((color_3dsColor3 + vec3(texture(texture0, uv0).rgb.g)), 0, 1)*clamp(clamp((vec3(texture(texture1, uv0).rgb.b)*texture(texture2, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb + clamp(color_3dsColor2*vec3(1 + -1*vertexColor0.rgb.r*vertexColor0.rgb.r*2) + clamp(vertexColor0.rgb, 0, 1), 0, 1)), 0, 1)*texture(texture1, uv0).rgb*vec3(2)*(ambientLightColor.rgb + mergedLightDiffuseColor.rgb), 0, 1), 0, 1); + vec3 colorComponent = clamp(clamp((color_3dsColor3 + vec3(texture(texture0, uv0).rgb.g)), 0, 1)*clamp(clamp((vec3(texture(texture1, uv0).rgb.b)*texture(texture2, sphericalReflectionUv).rgb + clamp(color_3dsColor2*vec3(1 + -1*vertexColor0.rgb.r*vertexColor0.rgb.r*2) + clamp(vertexColor0.rgb, 0, 1), 0, 1)), 0, 1)*texture(texture1, uv0).rgb*vec3(2)*(ambientLightColor.rgb + mergedLightDiffuseColor.rgb), 0, 1), 0, 1); float alphaComponent = vertexColor0.a*texture(texture1, uv0).a*scalar_3dsAlpha1; diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/opdn/output/material2.vertex.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/opdn/output/material2.vertex.glsl index ee3da555d..09e6acceb 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/opdn/output/material2.vertex.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/luigis_mansion_3d/opdn/output/material2.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/majoras_mask_3d/zelda_cow/output/material0.fragment.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/majoras_mask_3d/zelda_cow/output/material0.fragment.glsl index 3039fbe35..6ab53a68c 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/majoras_mask_3d/zelda_cow/output/material0.fragment.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/majoras_mask_3d/zelda_cow/output/material0.fragment.glsl @@ -133,7 +133,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = clamp(clamp((texture(texture0, uv0).rgb + texture(texture1, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb), 0, 1)*(ambientLightColor.rgb*vec3(0.4000000059604645) + mergedLightDiffuseColor.rgb*vec3(0.49803921580314636))*vec3(2), 0, 1); + vec3 colorComponent = clamp(clamp((texture(texture0, uv0).rgb + texture(texture1, sphericalReflectionUv).rgb), 0, 1)*(ambientLightColor.rgb*vec3(0.4000000059604645) + mergedLightDiffuseColor.rgb*vec3(0.49803921580314636))*vec3(2), 0, 1); float alphaComponent = vertexColor0.a*texture(texture0, uv0).a*scalar_3dsAlpha3; diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/majoras_mask_3d/zelda_cow/output/material0.vertex.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/majoras_mask_3d/zelda_cow/output/material0.vertex.glsl index a1db23bcb..f248682a6 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/majoras_mask_3d/zelda_cow/output/material0.vertex.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/majoras_mask_3d/zelda_cow/output/material0.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/ocarina_of_time_3d/zelda_cow/output/material0.fragment.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/ocarina_of_time_3d/zelda_cow/output/material0.fragment.glsl index 6a62502f3..05659e3f2 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/ocarina_of_time_3d/zelda_cow/output/material0.fragment.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/ocarina_of_time_3d/zelda_cow/output/material0.fragment.glsl @@ -132,7 +132,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = clamp(clamp(vertexColor0.rgb*(ambientLightColor.rgb*vec3(0.4000000059604645) + mergedLightDiffuseColor.rgb*vec3(0.49803921580314636) + mergedLightSpecularColor.rgb)*texture(texture0, uv0).rgb*vec3(2), 0, 1) + texture(texture1, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb, 0, 1); + vec3 colorComponent = clamp(clamp(vertexColor0.rgb*(ambientLightColor.rgb*vec3(0.4000000059604645) + mergedLightDiffuseColor.rgb*vec3(0.49803921580314636) + mergedLightSpecularColor.rgb)*texture(texture0, uv0).rgb*vec3(2), 0, 1) + texture(texture1, sphericalReflectionUv).rgb, 0, 1); float alphaComponent = vertexColor0.a*texture(texture0, uv0).a; diff --git a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/ocarina_of_time_3d/zelda_cow/output/material0.vertex.glsl b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/ocarina_of_time_3d/zelda_cow/output/material0.vertex.glsl index a1db23bcb..f248682a6 100644 --- a/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/ocarina_of_time_3d/zelda_cow/output/material0.vertex.glsl +++ b/FinModelUtility/Formats/Grezzo/Grezzo Tests/goldens/cmb/ocarina_of_time_3d/zelda_cow/output/material0.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/000005B4.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/000005B4.fragment.glsl index c46cd27d0..f66d15dbe 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/000005B4.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/000005B4.fragment.glsl @@ -8,7 +8,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/000005B4.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/000005B4.vertex.glsl index 58a869e5c..dac4188f1 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/000005B4.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/000005B4.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/00000674.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/00000674.fragment.glsl index c46cd27d0..f66d15dbe 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/00000674.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/00000674.fragment.glsl @@ -8,7 +8,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/00000674.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/00000674.vertex.glsl index 58a869e5c..dac4188f1 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/00000674.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_plug/output/00000674.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_robo/output/00002200.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_robo/output/00002200.fragment.glsl index 7c4a5b2a3..13c52b76f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_robo/output/00002200.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_robo/output/00002200.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.6509804129600525)*vec3(0.30000001192092896) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.699999988079071); + vec3 colorComponent = mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.6509804129600525)*vec3(0.30000001192092896) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.699999988079071); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_robo/output/00002200.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_robo/output/00002200.vertex.glsl index 049332dca..d305f766e 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_robo/output/00002200.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/chibi_robo/cb_robo/output/00002200.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A7B0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A7B0.fragment.glsl index 17bf2dba0..766e0c4de 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A7B0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A7B0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471) + mergedLightSpecularColor.rgb)*texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471) + mergedLightSpecularColor.rgb)*texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A7B0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A7B0.vertex.glsl index a511607ee..ff4abb00c 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A7B0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A7B0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A850.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A850.fragment.glsl index 17bf2dba0..766e0c4de 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A850.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A850.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471) + mergedLightSpecularColor.rgb)*texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471) + mergedLightSpecularColor.rgb)*texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A850.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A850.vertex.glsl index a511607ee..ff4abb00c 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A850.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/PlMr/output/0000A850.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E820.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E8C0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002E960.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EA00.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EAA0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EB40.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EBE0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EC80.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002ED20.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EDC0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EE60.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EF00.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002EFA0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F040.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F0E0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F180.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F220.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F2C0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F360.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F400.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F4A0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F540.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F5E0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F680.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F720.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F7C0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F860.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F900.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002F9A0.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FA40.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.fragment.glsl index f13169290..1a4da0be8 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(1,0.20000000298023224,0) + vec3(1,0.800000011920929,0)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(1,0.20000000298023224,0) + vec3(1,0.800000011920929,0)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FB0C.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.fragment.glsl index f13169290..1a4da0be8 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(1,0.20000000298023224,0) + vec3(1,0.800000011920929,0)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(1,0.20000000298023224,0) + vec3(1,0.800000011920929,0)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FBD8.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FC78.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.fragment.glsl index a907a5ddc..75ff36240 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471,0.501960813999176,0) + vec3(1,1,0.5490196347236633)*mergedLightSpecularColor.rgb)*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyAndruf/output/0002FD18.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.fragment.glsl index c46cd27d0..f66d15dbe 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.fragment.glsl @@ -8,7 +8,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.vertex.glsl index f56fa4ed3..edc3d0b85 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000B5F8.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.fragment.glsl index fa3ab6b95..fe17ac96b 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.fragment.glsl @@ -10,7 +10,7 @@ in vec2 uv1; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(2)*texture(texture0, uv0).rgb*texture(texture1, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = vec3(2)*texture(texture0, uv0).rgb*texture(texture1, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.vertex.glsl index 020671fca..4b532a9f5 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C068.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; uv1 = in_Uvs[1]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.fragment.glsl index 2c45c1127..86f03ad1b 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.fragment.glsl @@ -9,7 +9,7 @@ in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(2)*vertexColor0.rgb*vec3(0.5) + texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb*vec3(0.5); + vec3 colorComponent = vec3(2)*vertexColor0.rgb*vec3(0.5) + texture(texture0, sphericalReflectionUv).rgb*vec3(0.5); float alphaComponent = 0.3499999940395355*vertexColor0.a; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.vertex.glsl index d6b3d2ba1..3d4489861 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C1A8.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.fragment.glsl index fa3ab6b95..fe17ac96b 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.fragment.glsl @@ -10,7 +10,7 @@ in vec2 uv1; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(2)*texture(texture0, uv0).rgb*texture(texture1, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = vec3(2)*texture(texture0, uv0).rgb*texture(texture1, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.vertex.glsl index 020671fca..4b532a9f5 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000C7A8.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; uv1 = in_Uvs[1]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.fragment.glsl index fa3ab6b95..fe17ac96b 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.fragment.glsl @@ -10,7 +10,7 @@ in vec2 uv1; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(2)*texture(texture0, uv0).rgb*texture(texture1, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = vec3(2)*texture(texture0, uv0).rgb*texture(texture1, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.vertex.glsl index 020671fca..4b532a9f5 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000CC68.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; uv1 = in_Uvs[1]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.fragment.glsl index fa3ab6b95..fe17ac96b 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.fragment.glsl @@ -10,7 +10,7 @@ in vec2 uv1; out vec4 fragColor; void main() { - vec3 colorComponent = vec3(2)*texture(texture0, uv0).rgb*texture(texture1, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = vec3(2)*texture(texture0, uv0).rgb*texture(texture1, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.vertex.glsl index 020671fca..4b532a9f5 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyBField/output/0000D128.vertex.glsl @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; uv1 = in_Uvs[1]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.fragment.glsl index 17bf2dba0..766e0c4de 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471) + mergedLightSpecularColor.rgb)*texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.7019608020782471) + mergedLightSpecularColor.rgb)*texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00047A98.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.fragment.glsl index 8a9cd6630..94673c3d9 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.800000011920929) + vec3(0.7019608020782471)*mergedLightSpecularColor.rgb)*texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.800000011920929) + vec3(0.7019608020782471)*mergedLightSpecularColor.rgb)*texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00048078.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.fragment.glsl index 8a9cd6630..94673c3d9 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.800000011920929) + vec3(0.7019608020782471)*mergedLightSpecularColor.rgb)*texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.800000011920929) + vec3(0.7019608020782471)*mergedLightSpecularColor.rgb)*texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049A78.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.fragment.glsl index 8a9cd6630..94673c3d9 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.800000011920929) + vec3(0.7019608020782471)*mergedLightSpecularColor.rgb)*texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.800000011920929) + vec3(0.7019608020782471)*mergedLightSpecularColor.rgb)*texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049BF8.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.fragment.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.fragment.glsl index 8a9cd6630..94673c3d9 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.fragment.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.fragment.glsl @@ -130,7 +130,7 @@ void main() { vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); - vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.800000011920929) + vec3(0.7019608020782471)*mergedLightSpecularColor.rgb)*texture(texture0, asin(sphericalReflectionUv) / 3.14159 + 0.5).rgb; + vec3 colorComponent = (mergedLightDiffuseColor.rgb*vec3(2)*vec3(0.800000011920929) + vec3(0.7019608020782471)*mergedLightSpecularColor.rgb)*texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1; diff --git a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.vertex.glsl b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.vertex.glsl index fe97a9d6b..83574615f 100644 --- a/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.vertex.glsl +++ b/FinModelUtility/Formats/Hsd/Hsd Tests/goldens/super_smash_bros_melee/TyDaisy/output/00049CB8.vertex.glsl @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - sphericalReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.fragment.glsl index 1c11f26b3..a4bffd5df 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.fragment.glsl @@ -42,7 +42,7 @@ uniform Texture texture3; uniform vec3 color_GxMaterialColor0; uniform vec3 color_GxAmbientColor0; uniform float scalar_GxAlphaRegister0; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -137,7 +137,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb + vec3(0.5) + color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture0, uv0).rgb*vec3(2)*clamp((vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb + vec3(0.5)), 0, 1) + vec3(-0.5), 0, 1); + vec3 colorComponent = clamp(vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb + vec3(0.5) + color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture0, uv0).rgb*vec3(2)*clamp((vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb + vec3(0.5)), 0, 1) + vec3(-0.5), 0, 1); float alphaComponent = texture(texture3.sampler, texture3.transform2d * vec3((uv0).x, (uv0).y, 1)).a + -1*(1 + -1*scalar_GxAlphaRegister0); diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.vertex.glsl index fb9da74df..c455f3058 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/ashi_mat.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/body_mat.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/body_mat.fragment.glsl index 1c11f26b3..a4bffd5df 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/body_mat.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/body_mat.fragment.glsl @@ -42,7 +42,7 @@ uniform Texture texture3; uniform vec3 color_GxMaterialColor0; uniform vec3 color_GxAmbientColor0; uniform float scalar_GxAlphaRegister0; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -137,7 +137,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb + vec3(0.5) + color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture0, uv0).rgb*vec3(2)*clamp((vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb + vec3(0.5)), 0, 1) + vec3(-0.5), 0, 1); + vec3 colorComponent = clamp(vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb + vec3(0.5) + color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture0, uv0).rgb*vec3(2)*clamp((vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb + vec3(0.5)), 0, 1) + vec3(-0.5), 0, 1); float alphaComponent = texture(texture3.sampler, texture3.transform2d * vec3((uv0).x, (uv0).y, 1)).a + -1*(1 + -1*scalar_GxAlphaRegister0); diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/body_mat.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/body_mat.vertex.glsl index fb9da74df..c455f3058 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/body_mat.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/body_mat.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/tama_mat.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/tama_mat.fragment.glsl index ef2be18af..132aacf74 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/tama_mat.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/tama_mat.fragment.glsl @@ -42,7 +42,7 @@ uniform Texture texture3; uniform vec3 color_GxMaterialColor0; uniform vec3 color_GxAmbientColor0; uniform float scalar_GxAlphaRegister0; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -137,7 +137,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb + vec3(0.5) + color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*vec3(2)*clamp((vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb + vec3(0.5)), 0, 1) + vec3(-0.5), 0, 1); + vec3 colorComponent = clamp(vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb + vec3(0.5) + color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*vec3(2)*clamp((vec3(0.5)*texture(texture2.sampler, texture2.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb + vec3(0.5)), 0, 1) + vec3(-0.5), 0, 1); float alphaComponent = texture(texture3.sampler, texture3.transform2d * vec3((uv0).x, (uv0).y, 1)).a + -1*(1 + -1*scalar_GxAlphaRegister0); diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/tama_mat.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/tama_mat.vertex.glsl index fb9da74df..c455f3058 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/tama_mat.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/tama_mat.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_iron_v.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_iron_v.fragment.glsl index 38187628e..bdbd27714 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_iron_v.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_iron_v.fragment.glsl @@ -40,7 +40,7 @@ uniform Texture texture0; uniform Texture texture1; uniform Texture texture2; uniform vec3 color_GxAmbientColor0; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -137,7 +137,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(texture(texture1.sampler, texture1.transform2d * vec3((uv1).x, (uv1).y, 1)).rgb*clamp(clamp((texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb + clamp((vec3(1) + vec3(-1)*texture(texture2.sampler, texture2.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb), 0, 1)*(vec3(1) + vec3(-1)*vec3(texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).a))), 0, 1)*vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1), 0, 1)*vec3(2), 0, 1); + vec3 colorComponent = clamp(texture(texture1.sampler, texture1.transform2d * vec3((uv1).x, (uv1).y, 1)).rgb*clamp(clamp((texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb + clamp((vec3(1) + vec3(-1)*texture(texture2.sampler, texture2.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb), 0, 1)*(vec3(1) + vec3(-1)*vec3(texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).a))), 0, 1)*vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1), 0, 1)*vec3(2), 0, 1); float alphaComponent = vertexColor0.a; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_iron_v.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_iron_v.vertex.glsl index 0ddad80c1..fb8192ab9 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_iron_v.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_iron_v.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; out vec2 uv1; out vec4 vertexColor0; @@ -30,7 +30,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; uv1 = in_Uvs[1]; vertexColor0 = in_Colors[0]; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_plate_v.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_plate_v.fragment.glsl index 244ca2403..3f5e9302b 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_plate_v.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_plate_v.fragment.glsl @@ -40,7 +40,7 @@ uniform sampler2D texture0; uniform Texture texture1; uniform sampler2D texture2; uniform vec3 color_GxAmbientColor0; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -137,7 +137,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*clamp((texture(texture2, uv1).rgb + texture(texture1.sampler, texture1.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*texture(texture0, uv0).rgb*vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*vec3(0.5)*vec3(2)), 0, 1)*vec3(2), 0, 1); + vec3 colorComponent = clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*clamp((texture(texture2, uv1).rgb + texture(texture1.sampler, texture1.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*texture(texture0, uv0).rgb*vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*vec3(0.5)*vec3(2)), 0, 1)*vec3(2), 0, 1); float alphaComponent = vertexColor0.a; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_plate_v.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_plate_v.vertex.glsl index 0ddad80c1..fb8192ab9 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_plate_v.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/a_plate_v.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; out vec2 uv1; out vec4 vertexColor0; @@ -30,7 +30,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; uv1 = in_Uvs[1]; vertexColor0 = in_Colors[0]; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.fragment.glsl index cbba35214..909760bd2 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.fragment.glsl @@ -35,7 +35,7 @@ uniform sampler2D texture1; uniform sampler2D texture2; uniform sampler2D texture3; uniform vec3 color_GxAmbientColor0; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -132,7 +132,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(clamp((clamp(vec3(texture(texture1, acos(linearReflectionUv) / 3.14159).a)*clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture0, uv0).rgb, 0, 1), 0, 1) + vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture2, uv0).rgb), 0, 1)*texture(texture3, uv1).rgb*vec3(2), 0, 1); + vec3 colorComponent = clamp(clamp((clamp(vec3(texture(texture1, sphericalReflectionUv).a)*clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture0, uv0).rgb, 0, 1), 0, 1) + vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + color_GxAmbientColor0), 0, 1)*texture(texture2, uv0).rgb), 0, 1)*texture(texture3, uv1).rgb*vec3(2), 0, 1); float alphaComponent = vertexColor0.a*texture(texture2, uv0).a; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.vertex.glsl index 0ddad80c1..fb8192ab9 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_forest/output/w_Nuki_tile_v_x.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; out vec2 uv1; out vec4 vertexColor0; @@ -30,7 +30,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; uv1 = in_Uvs[1]; vertexColor0 = in_Colors[0]; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/body.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/body.fragment.glsl index e1927469e..e3c7adba4 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/body.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/body.fragment.glsl @@ -43,7 +43,7 @@ uniform vec3 color_GxMaterialColor0; uniform vec3 color_GxAmbientColor0; uniform vec3 color_GxColorRegister0; uniform float scalar_GxMaterialAlpha0; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -138,7 +138,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(clamp(color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1)*texture(texture1, uv0).rgb*vec3(2), 0, 1) + texture(texture2, uv0).rgb*clamp((color_GxColorRegister0 + texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*(vec3(1) + vec3(-1)*texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb) + texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb)*vec3(2), 0, 1)*color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1), 0, 1); + vec3 colorComponent = clamp(clamp(color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1)*texture(texture1, uv0).rgb*vec3(2), 0, 1) + texture(texture2, uv0).rgb*clamp((color_GxColorRegister0 + texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*(vec3(1) + vec3(-1)*texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb) + texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb)*vec3(2), 0, 1)*color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1), 0, 1); float alphaComponent = scalar_GxMaterialAlpha0; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/body.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/body.vertex.glsl index 1079218ba..8b32aacd0 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/body.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/body.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.fragment.glsl index 43c09d8d3..b20d13287 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.fragment.glsl @@ -42,7 +42,7 @@ uniform vec3 color_GxAmbientColor1; uniform vec3 color_GxMaterialColor1; uniform vec3 color_GxColorRegister3; uniform float scalar_GxMaterialAlpha1; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -137,7 +137,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp((color_GxMaterialColor1*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1)*(vec3(1) + vec3(-1)*color_GxColorRegister3) + texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*color_GxColorRegister3 + color_GxMaterialColor1*clamp((individualLightDiffuseColors[7].rgb + clamp(color_GxAmbientColor1, 0, 1)), 0, 1))*vec3(2), 0, 1); + vec3 colorComponent = clamp((color_GxMaterialColor1*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1)*(vec3(1) + vec3(-1)*color_GxColorRegister3) + texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*color_GxColorRegister3 + color_GxMaterialColor1*clamp((individualLightDiffuseColors[7].rgb + clamp(color_GxAmbientColor1, 0, 1)), 0, 1))*vec3(2), 0, 1); float alphaComponent = 0.6470588235294118*scalar_GxMaterialAlpha1; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.vertex.glsl index 1079218ba..8b32aacd0 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/cocpit1_cov1.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/light_blue_r1.fragment.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/light_blue_r1.fragment.glsl index a8bec49d4..86eb718f0 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/light_blue_r1.fragment.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/light_blue_r1.fragment.glsl @@ -43,7 +43,7 @@ uniform vec3 color_GxAmbientColor0; uniform vec3 color_GxAmbientColor1; uniform vec3 color_GxMaterialColor3; uniform float scalar_GxMaterialAlpha3; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -138,7 +138,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp((color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1) + texture(texture2.sampler, texture2.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1)*(vec3(1) + vec3(-1)*texture(texture1.sampler, texture1.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb) + color_GxMaterialColor3*clamp((individualLightDiffuseColors[7].rgb + clamp(color_GxAmbientColor1, 0, 1)), 0, 1)*texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*vec3(4)*texture(texture1.sampler, texture1.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb)*vec3(2), 0, 1); + vec3 colorComponent = clamp((color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1) + texture(texture2.sampler, texture2.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + color_GxAmbientColor0), 0, 1)*(vec3(1) + vec3(-1)*texture(texture1.sampler, texture1.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb) + color_GxMaterialColor3*clamp((individualLightDiffuseColors[7].rgb + clamp(color_GxAmbientColor1, 0, 1)), 0, 1)*texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*vec3(4)*texture(texture1.sampler, texture1.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb)*vec3(2), 0, 1); float alphaComponent = scalar_GxMaterialAlpha3; diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/light_blue_r1.vertex.glsl b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/light_blue_r1.vertex.glsl index 1079218ba..8b32aacd0 100644 --- a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/light_blue_r1.vertex.glsl +++ b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_ufo/output/light_blue_r1.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material1.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material1.fragment.glsl index a2e91dd6b..93a38661a 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material1.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material1.fragment.glsl @@ -35,7 +35,7 @@ uniform sampler2D texture1; uniform sampler2D texture2; uniform vec3 color_GxAmbientColor1; uniform float scalar_GxMaterialAlpha1; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -131,7 +131,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor1), 0, 1)*texture(texture0, uv0).rgb, 0, 1) + vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor1), 0, 1)*texture(texture0, uv0).rgb*clamp(vec3(scalar_GxMaterialAlpha1)*texture(texture2, uv0).rgb*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb*vec3(0.5), 0, 1), 0, 1); + vec3 colorComponent = clamp(clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor1), 0, 1)*texture(texture0, uv0).rgb, 0, 1) + vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor1), 0, 1)*texture(texture0, uv0).rgb*clamp(vec3(scalar_GxMaterialAlpha1)*texture(texture2, uv0).rgb*texture(texture1, sphericalReflectionUv).rgb*vec3(0.5), 0, 1), 0, 1); float alphaComponent = scalar_GxMaterialAlpha1; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material1.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material1.vertex.glsl index 0816c8f22..48367a19f 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material1.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material1.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; out vec4 vertexColor0; @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material19.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material19.fragment.glsl index 201ede74f..0dbd6df6a 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material19.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material19.fragment.glsl @@ -43,7 +43,7 @@ uniform Texture texture3; uniform vec3 color_GxMaterialColor19; uniform vec3 color_GxAmbientColor19; uniform float scalar_GxMaterialAlpha19; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -138,7 +138,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(clamp(texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor19*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor19), 0, 1), 0, 1) + texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor19*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor19), 0, 1)*clamp(texture(texture3.sampler, texture3.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor19*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor19), 0, 1)*texture(texture2.sampler, texture2.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*texture(texture1.sampler, texture1.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*vec3(4), 0, 1), 0, 1); + vec3 colorComponent = clamp(clamp(texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor19*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor19), 0, 1), 0, 1) + texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor19*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor19), 0, 1)*clamp(texture(texture3.sampler, texture3.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor19*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor19), 0, 1)*texture(texture2.sampler, texture2.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*texture(texture1.sampler, texture1.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*vec3(4), 0, 1), 0, 1); float alphaComponent = scalar_GxMaterialAlpha19; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material19.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material19.vertex.glsl index e03cb4540..7d3485243 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material19.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material19.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material27.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material27.fragment.glsl index 65bf0db19..4abec2269 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material27.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material27.fragment.glsl @@ -35,7 +35,7 @@ uniform sampler2D texture1; uniform sampler2D texture2; uniform vec3 color_GxAmbientColor27; uniform float scalar_GxMaterialAlpha27; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -131,7 +131,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor27), 0, 1)*texture(texture0, uv0).rgb, 0, 1) + vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor27), 0, 1)*texture(texture0, uv0).rgb*clamp(vec3(scalar_GxMaterialAlpha27)*texture(texture2, uv0).rgb*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb*vec3(0.5), 0, 1), 0, 1); + vec3 colorComponent = clamp(clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor27), 0, 1)*texture(texture0, uv0).rgb, 0, 1) + vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor27), 0, 1)*texture(texture0, uv0).rgb*clamp(vec3(scalar_GxMaterialAlpha27)*texture(texture2, uv0).rgb*texture(texture1, sphericalReflectionUv).rgb*vec3(0.5), 0, 1), 0, 1); float alphaComponent = scalar_GxMaterialAlpha27; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material27.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material27.vertex.glsl index 0816c8f22..48367a19f 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material27.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material27.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; out vec4 vertexColor0; @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material3.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material3.fragment.glsl index af3d06606..b1a7f1881 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material3.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material3.fragment.glsl @@ -41,7 +41,7 @@ uniform sampler2D texture1; uniform vec3 color_GxMaterialColor3; uniform vec3 color_GxAmbientColor3; uniform float scalar_GxMaterialAlpha3; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -136,9 +136,9 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = texture(texture1, uv0).rgb*texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor3), 0, 1)*vec3(2); + vec3 colorComponent = texture(texture1, uv0).rgb*texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor3), 0, 1)*vec3(2); - float alphaComponent = texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).a*scalar_GxMaterialAlpha3; + float alphaComponent = texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).a*scalar_GxMaterialAlpha3; fragColor = vec4(colorComponent, alphaComponent); } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material3.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material3.vertex.glsl index e03cb4540..7d3485243 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material3.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material3.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material4.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material4.fragment.glsl index e88030c6c..138520f67 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material4.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material4.fragment.glsl @@ -8,14 +8,14 @@ struct Texture { uniform Texture texture0; uniform Texture texture1; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec2 uv0; out vec4 fragColor; void main() { - vec3 colorComponent = clamp(clamp((texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb + vec3(-0.5))*vec3(0.5), 0, 1) + (texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb + vec3(-0.5))*vec3(0.5)*(vec3(1) + vec3(-1)*texture(texture1.sampler, texture1.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb) + texture(texture1.sampler, texture1.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*texture(texture1.sampler, texture1.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb, 0, 1); + vec3 colorComponent = clamp(clamp((texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb + vec3(-0.5))*vec3(0.5), 0, 1) + (texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb + vec3(-0.5))*vec3(0.5)*(vec3(1) + vec3(-1)*texture(texture1.sampler, texture1.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb) + texture(texture1.sampler, texture1.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*texture(texture1.sampler, texture1.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb, 0, 1); float alphaComponent = 0; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material4.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material4.vertex.glsl index e03cb4540..7d3485243 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material4.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material4.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material47.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material47.fragment.glsl index 1c81a4b45..f2b4f42a0 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material47.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material47.fragment.glsl @@ -41,7 +41,7 @@ uniform sampler2D texture1; uniform Texture texture2; uniform vec3 color_GxAmbientColor47; uniform float scalar_GxMaterialAlpha47; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -137,7 +137,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor47), 0, 1)*texture(texture0, uv0).rgb, 0, 1) + vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor47), 0, 1)*texture(texture0, uv0).rgb*clamp(vec3(scalar_GxMaterialAlpha47)*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb*texture(texture2.sampler, texture2.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb, 0, 1), 0, 1); + vec3 colorComponent = clamp(clamp(vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor47), 0, 1)*texture(texture0, uv0).rgb, 0, 1) + vertexColor0.rgb*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor47), 0, 1)*texture(texture0, uv0).rgb*clamp(vec3(scalar_GxMaterialAlpha47)*texture(texture1, sphericalReflectionUv).rgb*texture(texture2.sampler, texture2.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb, 0, 1), 0, 1); float alphaComponent = scalar_GxMaterialAlpha47; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material47.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material47.vertex.glsl index 0816c8f22..48367a19f 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material47.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material47.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; out vec4 vertexColor0; @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; vertexColor0 = in_Colors[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material76.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material76.fragment.glsl index f789f46c5..031c364f9 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material76.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material76.fragment.glsl @@ -41,7 +41,7 @@ uniform sampler2D texture1; uniform vec3 color_GxMaterialColor76; uniform vec3 color_GxAmbientColor76; uniform float scalar_GxMaterialAlpha76; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -136,9 +136,9 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = texture(texture1, uv0).rgb*texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*color_GxMaterialColor76*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor76), 0, 1)*vec3(2); + vec3 colorComponent = texture(texture1, uv0).rgb*texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*color_GxMaterialColor76*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor76), 0, 1)*vec3(2); - float alphaComponent = texture(texture0.sampler, texture0.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).a*scalar_GxMaterialAlpha76; + float alphaComponent = texture(texture0.sampler, texture0.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).a*scalar_GxMaterialAlpha76; fragColor = vec4(colorComponent, alphaComponent); } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material76.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material76.vertex.glsl index e03cb4540..7d3485243 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material76.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material76.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material79.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material79.fragment.glsl index d8727ed47..213e95d85 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material79.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material79.fragment.glsl @@ -43,7 +43,7 @@ uniform Texture texture3; uniform vec3 color_GxMaterialColor79; uniform vec3 color_GxAmbientColor79; uniform float scalar_GxMaterialAlpha79; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -138,7 +138,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(clamp(texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor79*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor79), 0, 1), 0, 1) + texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor79*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor79), 0, 1)*clamp(texture(texture3.sampler, texture3.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor79*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor79), 0, 1)*texture(texture2.sampler, texture2.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*texture(texture1.sampler, texture1.transform2d * vec3((acos(linearReflectionUv) / 3.14159).x, (acos(linearReflectionUv) / 3.14159).y, 1)).rgb*vec3(4), 0, 1), 0, 1); + vec3 colorComponent = clamp(clamp(texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor79*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor79), 0, 1), 0, 1) + texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor79*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor79), 0, 1)*clamp(texture(texture3.sampler, texture3.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*color_GxMaterialColor79*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor79), 0, 1)*texture(texture2.sampler, texture2.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb*texture(texture1.sampler, texture1.transform2d * vec3((sphericalReflectionUv).x, (sphericalReflectionUv).y, 1)).rgb*vec3(4), 0, 1), 0, 1); float alphaComponent = scalar_GxMaterialAlpha79; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material79.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material79.vertex.glsl index e03cb4540..7d3485243 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material79.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/cave/output/material79.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material0.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material0.fragment.glsl index aff887141..c7dd5471d 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material0.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material0.fragment.glsl @@ -36,7 +36,7 @@ uniform vec3 color_GxMaterialColor0; uniform vec3 color_GxAmbientColor0; uniform vec3 color_GxColorRegister0; uniform float scalar_GxMaterialAlpha0; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -131,7 +131,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(texture(texture0, uv0).rgb*color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor0), 0, 1) + vec3(-0.5) + color_GxColorRegister0*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb, 0, 1); + vec3 colorComponent = clamp(texture(texture0, uv0).rgb*color_GxMaterialColor0*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor0), 0, 1) + vec3(-0.5) + color_GxColorRegister0*texture(texture1, sphericalReflectionUv).rgb, 0, 1); float alphaComponent = scalar_GxMaterialAlpha0; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material0.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material0.vertex.glsl index 4ec0ce712..98e48f71d 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material0.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material0.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material2.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material2.fragment.glsl index bfc0d8687..20ef24f0b 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material2.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material2.fragment.glsl @@ -36,7 +36,7 @@ uniform vec3 color_GxMaterialColor2; uniform vec3 color_GxAmbientColor2; uniform vec3 color_GxColorRegister6; uniform float scalar_GxMaterialAlpha2; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -131,7 +131,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(texture(texture0, uv0).rgb*color_GxMaterialColor2*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor2), 0, 1) + vec3(-0.5) + color_GxColorRegister6*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb, 0, 1); + vec3 colorComponent = clamp(texture(texture0, uv0).rgb*color_GxMaterialColor2*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor2), 0, 1) + vec3(-0.5) + color_GxColorRegister6*texture(texture1, sphericalReflectionUv).rgb, 0, 1); float alphaComponent = scalar_GxMaterialAlpha2; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material2.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material2.vertex.glsl index 4ec0ce712..98e48f71d 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material2.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material2.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -28,6 +28,6 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; } diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material3.fragment.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material3.fragment.glsl index 37630961b..cbb7ffe68 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material3.fragment.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material3.fragment.glsl @@ -39,7 +39,7 @@ uniform vec3 color_GxColorRegister10; uniform vec3 color_GxColorRegister9; uniform float scalar_GxMaterialAlpha3; uniform float scalar_GxAlphaRegister11; -in vec2 linearReflectionUv; +in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -135,7 +135,7 @@ void main() { individualLightSpecularColors[i] = specularLightColor; } - vec3 colorComponent = clamp(color_GxColorRegister11*(vec3(1) + vec3(-1)*clamp((color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor3), 0, 1) + vec3(1) + vec3(-1)*vec3(scalar_GxAlphaRegister11) + texture(texture1, acos(linearReflectionUv) / 3.14159).rgb*vec3(scalar_GxAlphaRegister11) + vec3(-1)*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb*vec3(scalar_GxAlphaRegister11)), 0, 1)) + texture(texture0, uv0).rgb*clamp((color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor3), 0, 1) + vec3(1) + vec3(-1)*vec3(scalar_GxAlphaRegister11) + texture(texture1, acos(linearReflectionUv) / 3.14159).rgb*vec3(scalar_GxAlphaRegister11) + vec3(-1)*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb*vec3(scalar_GxAlphaRegister11)), 0, 1) + color_GxColorRegister10*(vec3(1) + vec3(-1)*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb) + color_GxColorRegister9*texture(texture1, acos(linearReflectionUv) / 3.14159).rgb + vec3(-0.5), 0, 1); + vec3 colorComponent = clamp(color_GxColorRegister11*(vec3(1) + vec3(-1)*clamp((color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor3), 0, 1) + vec3(1) + vec3(-1)*vec3(scalar_GxAlphaRegister11) + texture(texture1, sphericalReflectionUv).rgb*vec3(scalar_GxAlphaRegister11) + vec3(-1)*texture(texture1, sphericalReflectionUv).rgb*vec3(scalar_GxAlphaRegister11)), 0, 1)) + texture(texture0, uv0).rgb*clamp((color_GxMaterialColor3*clamp((individualLightDiffuseColors[0].rgb + individualLightDiffuseColors[1].rgb + individualLightDiffuseColors[2].rgb + color_GxAmbientColor3), 0, 1) + vec3(1) + vec3(-1)*vec3(scalar_GxAlphaRegister11) + texture(texture1, sphericalReflectionUv).rgb*vec3(scalar_GxAlphaRegister11) + vec3(-1)*texture(texture1, sphericalReflectionUv).rgb*vec3(scalar_GxAlphaRegister11)), 0, 1) + color_GxColorRegister10*(vec3(1) + vec3(-1)*texture(texture1, sphericalReflectionUv).rgb) + color_GxColorRegister9*texture(texture1, sphericalReflectionUv).rgb + vec3(-0.5), 0, 1); float alphaComponent = scalar_GxMaterialAlpha3; diff --git a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material3.vertex.glsl b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material3.vertex.glsl index 8d92fa0e3..96b2a83f7 100644 --- a/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material3.vertex.glsl +++ b/FinModelUtility/Formats/Mod/Mod Tests/goldens/kogane/output/material3.vertex.glsl @@ -20,7 +20,7 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 linearReflectionUv; +out vec2 sphericalReflectionUv; out vec2 uv0; out vec2 uv1; @@ -29,7 +29,7 @@ void main() { vertexNormal = normalize(modelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(modelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - linearReflectionUv = normalize(mvpMatrix * vec4(in_Normal, 0)).xy; + sphericalReflectionUv = asin(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159 + .5; uv0 = in_Uvs[0]; uv1 = in_Uvs[1]; } diff --git a/FinModelUtility/Platforms/Gx/src/impl/GxLazyTextureDictionary.cs b/FinModelUtility/Platforms/Gx/src/impl/GxLazyTextureDictionary.cs index 825d50190..0b60bc395 100644 --- a/FinModelUtility/Platforms/Gx/src/impl/GxLazyTextureDictionary.cs +++ b/FinModelUtility/Platforms/Gx/src/impl/GxLazyTextureDictionary.cs @@ -70,7 +70,7 @@ public GxLazyTextureDictionary( break; } case GxTexGenSrc.Normal: { - texture.UvType = UvType.LINEAR; + texture.UvType = UvType.SPHERICAL; break; } default: {