From 333ce48cde52762134336a1746633b57db9adeaa Mon Sep 17 00:00:00 2001 From: MeltyPlayer Date: Sat, 21 Dec 2024 04:52:24 -0600 Subject: [PATCH] Fixed some more reflection/bump map bugs. --- .../Fin/Fin/src/image/BumpMapUtils.cs | 41 ++++- .../FixedFunctionEquationsGlslPrinter.cs | 47 +++--- .../Fin/Fin/src/model/MaterialInterfaces.cs | 2 +- .../src/model/impl/material/BTextureImpl.cs | 4 +- .../Fin/Fin/src/shaders/glsl/GlslConstants.cs | 1 - .../Fin/Fin/src/shaders/glsl/GlslUtil.cs | 151 ++++++------------ .../src/shaders/glsl/ShaderRequirements.cs | 11 +- .../bfire/output/material0.fragment.glsl | 11 +- .../bfire/output/material0.vertex.glsl | 15 -- .../bfire/output/material2.fragment.glsl | 11 +- .../bfire/output/material2.vertex.glsl | 15 -- .../opdn/output/material2.fragment.glsl | 11 +- .../opdn/output/material2.vertex.glsl | 15 -- .../zelda_cow/output/material0.fragment.glsl | 11 +- .../zelda_cow/output/material0.vertex.glsl | 15 -- .../zelda_cow/output/material0.fragment.glsl | 11 +- .../zelda_cow/output/material0.vertex.glsl | 15 -- .../cb_plug/output/000005B4.fragment.glsl | 15 +- .../cb_plug/output/000005B4.vertex.glsl | 15 -- .../cb_plug/output/00000674.fragment.glsl | 15 +- .../cb_plug/output/00000674.vertex.glsl | 15 -- .../cb_robo/output/00002200.fragment.glsl | 11 +- .../cb_robo/output/00002200.vertex.glsl | 15 -- .../PlMr/output/0000A7B0.fragment.glsl | 11 +- .../PlMr/output/0000A7B0.vertex.glsl | 15 -- .../PlMr/output/0000A850.fragment.glsl | 11 +- .../PlMr/output/0000A850.vertex.glsl | 15 -- .../TyAndruf/output/0002E820.fragment.glsl | 11 +- .../TyAndruf/output/0002E820.vertex.glsl | 15 -- .../TyAndruf/output/0002E8C0.fragment.glsl | 11 +- .../TyAndruf/output/0002E8C0.vertex.glsl | 15 -- .../TyAndruf/output/0002E960.fragment.glsl | 11 +- .../TyAndruf/output/0002E960.vertex.glsl | 15 -- .../TyAndruf/output/0002EA00.fragment.glsl | 11 +- .../TyAndruf/output/0002EA00.vertex.glsl | 15 -- .../TyAndruf/output/0002EAA0.fragment.glsl | 11 +- .../TyAndruf/output/0002EAA0.vertex.glsl | 15 -- .../TyAndruf/output/0002EB40.fragment.glsl | 11 +- .../TyAndruf/output/0002EB40.vertex.glsl | 15 -- .../TyAndruf/output/0002EBE0.fragment.glsl | 11 +- .../TyAndruf/output/0002EBE0.vertex.glsl | 15 -- .../TyAndruf/output/0002EC80.fragment.glsl | 11 +- .../TyAndruf/output/0002EC80.vertex.glsl | 15 -- .../TyAndruf/output/0002ED20.fragment.glsl | 11 +- .../TyAndruf/output/0002ED20.vertex.glsl | 15 -- .../TyAndruf/output/0002EDC0.fragment.glsl | 11 +- .../TyAndruf/output/0002EDC0.vertex.glsl | 15 -- .../TyAndruf/output/0002EE60.fragment.glsl | 11 +- .../TyAndruf/output/0002EE60.vertex.glsl | 15 -- .../TyAndruf/output/0002EF00.fragment.glsl | 11 +- .../TyAndruf/output/0002EF00.vertex.glsl | 15 -- .../TyAndruf/output/0002EFA0.fragment.glsl | 11 +- .../TyAndruf/output/0002EFA0.vertex.glsl | 15 -- .../TyAndruf/output/0002F040.fragment.glsl | 11 +- .../TyAndruf/output/0002F040.vertex.glsl | 15 -- .../TyAndruf/output/0002F0E0.fragment.glsl | 11 +- .../TyAndruf/output/0002F0E0.vertex.glsl | 15 -- .../TyAndruf/output/0002F180.fragment.glsl | 11 +- .../TyAndruf/output/0002F180.vertex.glsl | 15 -- .../TyAndruf/output/0002F220.fragment.glsl | 11 +- .../TyAndruf/output/0002F220.vertex.glsl | 15 -- .../TyAndruf/output/0002F2C0.fragment.glsl | 11 +- .../TyAndruf/output/0002F2C0.vertex.glsl | 15 -- .../TyAndruf/output/0002F360.fragment.glsl | 11 +- .../TyAndruf/output/0002F360.vertex.glsl | 15 -- .../TyAndruf/output/0002F400.fragment.glsl | 11 +- .../TyAndruf/output/0002F400.vertex.glsl | 15 -- .../TyAndruf/output/0002F4A0.fragment.glsl | 11 +- .../TyAndruf/output/0002F4A0.vertex.glsl | 15 -- .../TyAndruf/output/0002F540.fragment.glsl | 11 +- .../TyAndruf/output/0002F540.vertex.glsl | 15 -- .../TyAndruf/output/0002F5E0.fragment.glsl | 11 +- .../TyAndruf/output/0002F5E0.vertex.glsl | 15 -- .../TyAndruf/output/0002F680.fragment.glsl | 11 +- .../TyAndruf/output/0002F680.vertex.glsl | 15 -- .../TyAndruf/output/0002F720.fragment.glsl | 11 +- .../TyAndruf/output/0002F720.vertex.glsl | 15 -- .../TyAndruf/output/0002F7C0.fragment.glsl | 11 +- .../TyAndruf/output/0002F7C0.vertex.glsl | 15 -- .../TyAndruf/output/0002F860.fragment.glsl | 11 +- .../TyAndruf/output/0002F860.vertex.glsl | 15 -- .../TyAndruf/output/0002F900.fragment.glsl | 11 +- .../TyAndruf/output/0002F900.vertex.glsl | 15 -- .../TyAndruf/output/0002F9A0.fragment.glsl | 11 +- .../TyAndruf/output/0002F9A0.vertex.glsl | 15 -- .../TyAndruf/output/0002FA40.fragment.glsl | 11 +- .../TyAndruf/output/0002FA40.vertex.glsl | 15 -- .../TyAndruf/output/0002FB0C.fragment.glsl | 11 +- .../TyAndruf/output/0002FB0C.vertex.glsl | 15 -- .../TyAndruf/output/0002FBD8.fragment.glsl | 11 +- .../TyAndruf/output/0002FBD8.vertex.glsl | 15 -- .../TyAndruf/output/0002FC78.fragment.glsl | 11 +- .../TyAndruf/output/0002FC78.vertex.glsl | 15 -- .../TyAndruf/output/0002FD18.fragment.glsl | 11 +- .../TyAndruf/output/0002FD18.vertex.glsl | 15 -- .../TyBField/output/0000B5F8.fragment.glsl | 15 +- .../TyBField/output/0000B5F8.vertex.glsl | 15 -- .../TyBField/output/0000C068.fragment.glsl | 15 +- .../TyBField/output/0000C068.vertex.glsl | 15 -- .../TyBField/output/0000C1A8.fragment.glsl | 15 +- .../TyBField/output/0000C1A8.vertex.glsl | 15 -- .../TyBField/output/0000C7A8.fragment.glsl | 15 +- .../TyBField/output/0000C7A8.vertex.glsl | 15 -- .../TyBField/output/0000CC68.fragment.glsl | 15 +- .../TyBField/output/0000CC68.vertex.glsl | 15 -- .../TyBField/output/0000D128.fragment.glsl | 15 +- .../TyBField/output/0000D128.vertex.glsl | 15 -- .../TyDaisy/output/00047A98.fragment.glsl | 11 +- .../TyDaisy/output/00047A98.vertex.glsl | 15 -- .../TyDaisy/output/00048078.fragment.glsl | 11 +- .../TyDaisy/output/00048078.vertex.glsl | 15 -- .../TyDaisy/output/00049A78.fragment.glsl | 11 +- .../TyDaisy/output/00049A78.vertex.glsl | 15 -- .../TyDaisy/output/00049BF8.fragment.glsl | 11 +- .../TyDaisy/output/00049BF8.vertex.glsl | 15 -- .../TyDaisy/output/00049CB8.fragment.glsl | 11 +- .../TyDaisy/output/00049CB8.vertex.glsl | 15 -- .../pikmin_2_BigFoot/output/IP2V_damaind3.png | Bin 8503 -> 8518 bytes .../output/ashi_mat.fragment.glsl | 11 +- .../output/ashi_mat.vertex.glsl | 15 -- .../output/body_mat.fragment.glsl | 11 +- .../output/body_mat.vertex.glsl | 15 -- .../pikmin_2_BigFoot/output/enemy_0.png | Bin 6025 -> 6046 bytes .../pikmin_2_BigFoot/output/enemy_2.png | Bin 8503 -> 8518 bytes .../output/ooashi_footind_h.png | Bin 6025 -> 6046 bytes .../output/tama_mat.fragment.glsl | 11 +- .../output/tama_mat.vertex.glsl | 15 -- .../output/a_iron_v.fragment.glsl | 11 +- .../output/a_iron_v.vertex.glsl | 15 -- .../output/a_plate_v.fragment.glsl | 11 +- .../output/a_plate_v.vertex.glsl | 15 -- .../output/w_Nuki_tile_v_x.fragment.glsl | 11 +- .../output/w_Nuki_tile_v_x.vertex.glsl | 15 -- .../pikmin_2_ufo/output/body.fragment.glsl | 11 +- .../pikmin_2_ufo/output/body.vertex.glsl | 15 -- .../output/cocpit1_cov1.fragment.glsl | 11 +- .../output/cocpit1_cov1.vertex.glsl | 15 -- .../output/light_blue_r1.fragment.glsl | 11 +- .../output/light_blue_r1.vertex.glsl | 15 -- .../cave/output/material1.fragment.glsl | 11 +- .../goldens/cave/output/material1.vertex.glsl | 15 -- .../cave/output/material19.fragment.glsl | 11 +- .../cave/output/material19.vertex.glsl | 15 -- .../cave/output/material27.fragment.glsl | 11 +- .../cave/output/material27.vertex.glsl | 15 -- .../cave/output/material3.fragment.glsl | 11 +- .../goldens/cave/output/material3.vertex.glsl | 15 -- .../cave/output/material4.fragment.glsl | 15 +- .../goldens/cave/output/material4.vertex.glsl | 15 -- .../cave/output/material47.fragment.glsl | 11 +- .../cave/output/material47.vertex.glsl | 15 -- .../cave/output/material76.fragment.glsl | 11 +- .../cave/output/material76.vertex.glsl | 15 -- .../cave/output/material79.fragment.glsl | 11 +- .../cave/output/material79.vertex.glsl | 15 -- .../kogane/output/material0.fragment.glsl | 11 +- .../kogane/output/material0.vertex.glsl | 15 -- .../kogane/output/material2.fragment.glsl | 11 +- .../kogane/output/material2.vertex.glsl | 15 -- .../kogane/output/material3.fragment.glsl | 11 +- .../kogane/output/material3.vertex.glsl | 15 -- .../Gx/src/impl/GxFixedFunctionMaterial.cs | 10 +- 162 files changed, 914 insertions(+), 1339 deletions(-) diff --git a/FinModelUtility/Fin/Fin/src/image/BumpMapUtils.cs b/FinModelUtility/Fin/Fin/src/image/BumpMapUtils.cs index 2c199f210..e8b8a4f6d 100644 --- a/FinModelUtility/Fin/Fin/src/image/BumpMapUtils.cs +++ b/FinModelUtility/Fin/Fin/src/image/BumpMapUtils.cs @@ -1,4 +1,5 @@ using fin.image.formats; +using fin.model; using SixLabors.ImageSharp.PixelFormats; @@ -10,7 +11,9 @@ public static class BumpMapUtils { /// https://stackoverflow.com/questions/10652797/whats-the-logic-behind-creating-a-normal-map-from-a-texture /// public static unsafe Rgb24Image ConvertBumpMapImageToNormalImage( - IReadOnlyImage image) { + IReadOnlyImage image, + WrapMode wrapModeS, + WrapMode wrapModeT) { var normalImage = new Rgb24Image(PixelFormat.RGB888, image.Width, image.Height); using var normalImageLock = normalImage.UnsafeLock(); @@ -36,6 +39,14 @@ public static unsafe Rgb24Image ConvertBumpMapImageToNormalImage( out _, out _, out _); + } else if (wrapModeS is WrapMode.REPEAT) { + bumpGetHandler( + image.Width - 1, + y, + out leftIntensity, + out _, + out _, + out _); } else { leftIntensity = centerIntensity; } @@ -49,6 +60,14 @@ public static unsafe Rgb24Image ConvertBumpMapImageToNormalImage( out _, out _, out _); + } else if (wrapModeS is WrapMode.REPEAT) { + bumpGetHandler( + 0, + y, + out rightIntensity, + out _, + out _, + out _); } else { rightIntensity = centerIntensity; } @@ -62,6 +81,14 @@ public static unsafe Rgb24Image ConvertBumpMapImageToNormalImage( out _, out _, out _); + } else if (wrapModeT is WrapMode.REPEAT) { + bumpGetHandler( + x, + image.Height - 1, + out upIntensity, + out _, + out _, + out _); } else { upIntensity = centerIntensity; } @@ -75,15 +102,23 @@ public static unsafe Rgb24Image ConvertBumpMapImageToNormalImage( out _, out _, out _); + } else if (wrapModeT is WrapMode.REPEAT) { + bumpGetHandler( + x, + 0, + out downIntensity, + out _, + out _, + out _); } else { downIntensity = centerIntensity; } var xIntensity - = ((leftIntensity / 255f - rightIntensity / 255f + 1) * .5f) * + = ((rightIntensity / 255f - leftIntensity / 255f + 1) * .5f) * 255; var yIntensity - = ((upIntensity / 255f - downIntensity / 255f + 1) * .5f) * 255; + = ((downIntensity / 255f - upIntensity / 255f + 1) * .5f) * 255; normalImageScan0[y * image.Width + x] = new Rgb24((byte) xIntensity, (byte) yIntensity, 255); diff --git a/FinModelUtility/Fin/Fin/src/language/equations/fixedFunction/FixedFunctionEquationsGlslPrinter.cs b/FinModelUtility/Fin/Fin/src/language/equations/fixedFunction/FixedFunctionEquationsGlslPrinter.cs index 076c041e1..32a85a8a6 100644 --- a/FinModelUtility/Fin/Fin/src/language/equations/fixedFunction/FixedFunctionEquationsGlslPrinter.cs +++ b/FinModelUtility/Fin/Fin/src/language/equations/fixedFunction/FixedFunctionEquationsGlslPrinter.cs @@ -6,6 +6,7 @@ using fin.model; using fin.shaders.glsl; using fin.util.asserts; +using fin.util.enumerables; using fin.util.image; namespace fin.language.equations.fixedFunction; @@ -36,6 +37,13 @@ public void Print( sb.AppendLine(GlslConstants.FLOAT_PRECISION); sb.AppendLine(); + var usesSphericalReflectionMapping + = shaderRequirements.UsesSphericalReflectionMapping; + if (usesSphericalReflectionMapping) { + sb.AppendLine(GlslUtil.GetMatricesHeader(model)); + sb.AppendLine(); + } + var hasIndividualLights = Enumerable .Range(0, MaterialConstants.MAX_LIGHTS) @@ -60,6 +68,7 @@ public void Print( ]); var dependsOnLights = dependsOnMergedLights || dependsOnAnIndividualLight; + var dependsOnNormals = dependsOnLights || usesSphericalReflectionMapping; var dependsOnAmbientLight = equations.DoOutputsDependOn( [ @@ -83,7 +92,8 @@ public void Print( dependsOnIndividualTextures .Select((dependsOnTexture, i) => (i, dependsOnTexture)) .Where(tuple => tuple.dependsOnTexture) - .Select(tuple => textures[tuple.i]), + .Select(tuple => textures[tuple.i]) + .ConcatIfNonnull(material.NormalTexture), this.animations_); var hadUniform = false; @@ -126,21 +136,13 @@ public void Print( } }; - if (shaderRequirements.UsesSphericalReflectionMapping) { - AppendLineBetweenUniformsAndIns(); - sb.AppendLine( - $"in vec2 {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME};"); - } - - if (shaderRequirements.UsesLinearReflectionMapping) { + if (dependsOnLights) { AppendLineBetweenUniformsAndIns(); - sb.AppendLine( - $"in vec2 {GlslConstants.IN_LINEAR_REFLECTION_UV_NAME};"); + sb.AppendLine("in vec3 vertexPosition;"); } - if (dependsOnLights) { + if (dependsOnNormals) { AppendLineBetweenUniformsAndIns(); - sb.AppendLine("in vec3 vertexPosition;"); sb.AppendLine("in vec3 vertexNormal;"); if (hasNormalTexture && @@ -193,7 +195,7 @@ public void Print( sb.AppendLine("void main() {"); // Calculate lighting - if (dependsOnLights) { + if (dependsOnNormals) { if (!hasNormalTexture) { sb.AppendLine( """ @@ -204,10 +206,10 @@ public void Print( } else { sb.AppendLine( """ - // Have to renormalize because the vertex normals can become distorted when interpolated. - vec3 fragNormal = normalize(vertexNormal); + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); - """); + """); if (shaderRequirements.TangentType is TangentType.CALCULATED) { // Shamelessly stolen from: @@ -234,6 +236,13 @@ var texCoordName """); } + if (usesSphericalReflectionMapping) { + sb.AppendLine($""" + vec2 {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME} = acos(normalize({GlslConstants.UNIFORM_PROJECTION_MATRIX_NAME} * {GlslConstants.UNIFORM_VIEW_MATRIX_NAME} * vec4(fragNormal, 0)).xy) / 3.14159; + + """); + } + // TODO: Optimize this if the shader depends on merged lighting as well as individual lights for some reason. if (dependsOnAnIndividualLight) { sb.AppendLine( @@ -897,12 +906,6 @@ private string GetTextureValue_(int textureIndex, GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME, texture, this.animations_), - UvType.LINEAR - => GlslUtil.ReadColorFromTexture( - textureName, - GlslConstants.IN_LINEAR_REFLECTION_UV_NAME, - texture, - this.animations_), }; } diff --git a/FinModelUtility/Fin/Fin/src/model/MaterialInterfaces.cs b/FinModelUtility/Fin/Fin/src/model/MaterialInterfaces.cs index f304e4d34..50829962f 100644 --- a/FinModelUtility/Fin/Fin/src/model/MaterialInterfaces.cs +++ b/FinModelUtility/Fin/Fin/src/model/MaterialInterfaces.cs @@ -345,7 +345,7 @@ IFixedFunctionMaterial SetAlphaCompare( public enum UvType { STANDARD, SPHERICAL, - LINEAR, + LINEAR } public enum WrapMode { diff --git a/FinModelUtility/Fin/Fin/src/model/impl/material/BTextureImpl.cs b/FinModelUtility/Fin/Fin/src/model/impl/material/BTextureImpl.cs index bb648b925..55508f4c6 100644 --- a/FinModelUtility/Fin/Fin/src/model/impl/material/BTextureImpl.cs +++ b/FinModelUtility/Fin/Fin/src/model/impl/material/BTextureImpl.cs @@ -162,7 +162,9 @@ public override bool Equals(object? other) { return this.Name == otherTexture.Name && this.Image == otherTexture.Image && this.WrapModeU == otherTexture.WrapModeU && - this.WrapModeV == otherTexture.WrapModeV; + this.WrapModeV == otherTexture.WrapModeV && + this.UvType == otherTexture.UvType && + this.UvIndex == otherTexture.UvIndex; } return false; diff --git a/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslConstants.cs b/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslConstants.cs index 796900a5e..9c3594190 100644 --- a/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslConstants.cs +++ b/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslConstants.cs @@ -24,7 +24,6 @@ public static class GlslConstants { public const string IN_UV_NAME = "uv"; public const string IN_VERTEX_COLOR_NAME = "vertexColor"; public const string IN_SPHERICAL_REFLECTION_UV_NAME = "sphericalReflectionUv"; - public const string IN_LINEAR_REFLECTION_UV_NAME = "linearReflectionUv"; public const float MIN_ALPHA_BEFORE_DISCARD = .95f; public const string MIN_ALPHA_BEFORE_DISCARD_TEXT = ".95"; diff --git a/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs b/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs index d9d36aa1a..d48e8931b 100644 --- a/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs +++ b/FinModelUtility/Fin/Fin/src/shaders/glsl/GlslUtil.cs @@ -86,20 +86,14 @@ public static string GetVertexSrc(IReadOnlyModel model, var numBones = modelRequirements.NumBones; - vertexSrc.AppendLine($$""" - #version {{GlslConstants.VERTEX_SHADER_VERSION}} + vertexSrc.AppendLine($""" + #version {GlslConstants.VERTEX_SHADER_VERSION} - layout (std140, binding = {{GlslConstants.UBO_MATRICES_BINDING_INDEX}}) uniform {{GlslConstants.UBO_MATRICES_NAME}} { - mat4 {{GlslConstants.UNIFORM_MODEL_MATRIX_NAME}}; - mat4 {{GlslConstants.UNIFORM_VIEW_MATRIX_NAME}}; - mat4 {{GlslConstants.UNIFORM_PROJECTION_MATRIX_NAME}}; - - mat4 {{GlslConstants.UNIFORM_BONE_MATRICES_NAME}}[{{1 + model.Skin.BonesUsedByVertices.Count}}]; - }; + {GetMatricesHeader(model)} - uniform vec3 {{GlslConstants.UNIFORM_CAMERA_POSITION_NAME}}; + uniform vec3 {GlslConstants.UNIFORM_CAMERA_POSITION_NAME}; - layout(location = {{location++}}) in vec3 in_Position; + layout(location = {location++}) in vec3 in_Position; """); if (hasNormals) { @@ -167,16 +161,6 @@ public static string GetVertexSrc(IReadOnlyModel model, vertexSrc.AppendLine("out vec3 binormal;"); } - if (shaderRequirements.UsesSphericalReflectionMapping) { - vertexSrc.AppendLine( - $"out vec2 {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME};"); - } - - if (shaderRequirements.UsesLinearReflectionMapping) { - vertexSrc.AppendLine( - $"out vec2 {GlslConstants.IN_LINEAR_REFLECTION_UV_NAME};"); - } - for (var i = 0; i < usedUvs.Length; ++i) { if (usedUvs[i]) { vertexSrc.AppendLine($"out vec2 {GlslConstants.IN_UV_NAME}{i};"); @@ -259,32 +243,6 @@ void main() { if (hasBinormals) { vertexSrc.AppendLine(" binormal = cross(vertexNormal, tangent);"); } - - if (shaderRequirements.UsesSphericalReflectionMapping) { - Asserts.True(hasNormals); - vertexSrc.AppendLine($""" - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME} = r.xy / m + .5; - """); - } - - if (shaderRequirements.UsesLinearReflectionMapping) { - Asserts.True(modelRequirements.HasNormals); - vertexSrc.AppendLine( - $" {GlslConstants.IN_LINEAR_REFLECTION_UV_NAME} = acos(normalize(projectionVertexModelMatrix * vec4(in_Normal, 0)).xy) / 3.14159;"); - } } else { vertexSrc.AppendLine($@" gl_Position = mvpMatrix * vec4(in_Position, 1); @@ -304,30 +262,6 @@ void main() { if (hasBinormals) { vertexSrc.AppendLine(" binormal = cross(vertexNormal, tangent);"); } - - if (shaderRequirements.UsesSphericalReflectionMapping) { - Asserts.True(hasNormals); - vertexSrc.AppendLine($""" - - vec3 e = normalize( vec3( mvMatrix * vec4(in_Position, 1)) ); - vec3 n = normalize( vec3( mvMatrix * vec4(in_Normal, 0)) ); - - vec3 r = reflect( e, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - {GlslConstants.IN_SPHERICAL_REFLECTION_UV_NAME} = r.xy / m + .5; - """); - } - - if (shaderRequirements.UsesLinearReflectionMapping) { - Asserts.True(modelRequirements.HasNormals); - vertexSrc.AppendLine( - $" {GlslConstants.IN_LINEAR_REFLECTION_UV_NAME} = acos(normalize(mvpMatrix * vec4(in_Normal, 0)).xy) / 3.14159;"); - } } for (var i = 0; i < usedUvs.Length; ++i) { @@ -348,39 +282,48 @@ void main() { return vertexSrc.ToString(); } - public static string GetLightHeader(bool withAmbientLight) { - return - $$""" - struct Light { - // 0x00 (vec3 needs to be 16-byte aligned) - vec3 position; - bool enabled; - - // 0x10 (vec3 needs to be 16-byte aligned) - vec3 normal; - int sourceType; - - // 0x20 (vec4 needs to be 16-byte aligned) - vec4 color; - - // 0x30 (vec3 needs to be 16-byte aligned) - vec3 cosineAttenuation; - int diffuseFunction; - - // 0x40 (vec3 needs to be 16-byte aligned) - vec3 distanceAttenuation; - int attenuationFunction; - }; - - layout (std140, binding = {{GlslConstants.UBO_LIGHTS_BINDING_INDEX}}) uniform {{GlslConstants.UBO_LIGHTS_NAME}} { - Light lights[{{MaterialConstants.MAX_LIGHTS}}]; - vec4 ambientLightColor; - float {{GlslConstants.UNIFORM_USE_LIGHTING_NAME}}; - }; - - uniform vec3 {{GlslConstants.UNIFORM_CAMERA_POSITION_NAME}}; - """; - } + public static string GetMatricesHeader(IReadOnlyModel model) + => $$""" + layout (std140, binding = {{GlslConstants.UBO_MATRICES_BINDING_INDEX}}) uniform {{GlslConstants.UBO_MATRICES_NAME}} { + mat4 {{GlslConstants.UNIFORM_MODEL_MATRIX_NAME}}; + mat4 {{GlslConstants.UNIFORM_VIEW_MATRIX_NAME}}; + mat4 {{GlslConstants.UNIFORM_PROJECTION_MATRIX_NAME}}; + + mat4 {{GlslConstants.UNIFORM_BONE_MATRICES_NAME}}[{{1 + model.Skin.BonesUsedByVertices.Count}}]; + }; + """; + + public static string GetLightHeader(bool withAmbientLight) + => $$""" + struct Light { + // 0x00 (vec3 needs to be 16-byte aligned) + vec3 position; + bool enabled; + + // 0x10 (vec3 needs to be 16-byte aligned) + vec3 normal; + int sourceType; + + // 0x20 (vec4 needs to be 16-byte aligned) + vec4 color; + + // 0x30 (vec3 needs to be 16-byte aligned) + vec3 cosineAttenuation; + int diffuseFunction; + + // 0x40 (vec3 needs to be 16-byte aligned) + vec3 distanceAttenuation; + int attenuationFunction; + }; + + layout (std140, binding = {{GlslConstants.UBO_LIGHTS_BINDING_INDEX}}) uniform {{GlslConstants.UBO_LIGHTS_NAME}} { + Light lights[{{MaterialConstants.MAX_LIGHTS}}]; + vec4 ambientLightColor; + float {{GlslConstants.UNIFORM_USE_LIGHTING_NAME}}; + }; + + uniform vec3 {{GlslConstants.UNIFORM_CAMERA_POSITION_NAME}}; + """; public static string GetGetIndividualLightColorsFunction() { // Shamelessly stolen from: diff --git a/FinModelUtility/Fin/Fin/src/shaders/glsl/ShaderRequirements.cs b/FinModelUtility/Fin/Fin/src/shaders/glsl/ShaderRequirements.cs index 73f03c8d6..9aa5cbdbf 100644 --- a/FinModelUtility/Fin/Fin/src/shaders/glsl/ShaderRequirements.cs +++ b/FinModelUtility/Fin/Fin/src/shaders/glsl/ShaderRequirements.cs @@ -14,7 +14,6 @@ public enum TangentType { public interface IShaderRequirements { public bool UsesSphericalReflectionMapping { get; } - public bool UsesLinearReflectionMapping { get; } public bool HasNormals { get; } public TangentType TangentType { get; } @@ -34,8 +33,6 @@ private ShaderRequirements(IReadOnlyModel model, this.UsesSphericalReflectionMapping = material?.Textures.Any(t => t.UvType is UvType.SPHERICAL) ?? false; - this.UsesLinearReflectionMapping - = material?.Textures.Any(t => t.UvType is UvType.LINEAR) ?? false; this.TangentType = TangentType.NOT_PRESENT; foreach (var vertex in model.Skin.Meshes @@ -100,6 +97,13 @@ or IStandardMaterial } } + var normalTexture = fixedFunctionMaterial.NormalTexture; + if (normalTexture != null) { + var uvIndex = normalTexture.UvIndex; + Asserts.True(modelRequirements.NumUvs >= uvIndex + 1); + this.UsedUvs[uvIndex] = true; + } + for (var i = 0; i < this.UsedColors.Length; ++i) { if (equations.DoOutputsDependOn([ FixedFunctionSource.VERTEX_COLOR_0 + i, @@ -116,7 +120,6 @@ or IStandardMaterial } public bool UsesSphericalReflectionMapping { get; } - public bool UsesLinearReflectionMapping { get; } public bool HasNormals { get; } public TangentType TangentType { get; } public bool[] UsedUvs { get; } 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 38e4d8314..2119d6e1a 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[41]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -35,7 +43,6 @@ uniform sampler2D texture2; uniform float scalar_3dsAlpha0; uniform float scalar_3dsAlpha1; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -126,6 +133,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 21b3508df..7c36cf454 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -36,19 +35,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 b1c8b91f6..5fedcd79a 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[41]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -35,7 +43,6 @@ uniform sampler2D texture2; uniform float scalar_3dsAlpha0; uniform float scalar_3dsAlpha1; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -126,6 +133,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 21b3508df..7c36cf454 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -36,19 +35,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 324773be9..782e1cb3a 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[2]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -37,7 +45,6 @@ uniform vec3 color_3dsColor2; uniform vec3 color_3dsColor3; uniform float scalar_3dsAlpha1; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec4 vertexColor0; @@ -129,6 +136,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 95a9b9df2..7e919eb01 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 @@ -19,7 +19,6 @@ layout(location = 5) in vec4 in_Color0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; out vec4 vertexColor0; @@ -36,20 +35,6 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; vertexColor0 = in_Color0; } 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 1ef28c30d..43fa4e111 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[11]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -34,7 +42,6 @@ uniform sampler2D texture0; uniform sampler2D texture1; uniform float scalar_3dsAlpha3; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -125,6 +132,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 82074fb1c..54262d0f2 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -36,19 +35,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 890b43dfb..d2efc8364 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[11]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -33,7 +41,6 @@ uniform float shininess; uniform sampler2D texture0; uniform sampler2D texture1; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -124,6 +131,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 82074fb1c..54262d0f2 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -36,19 +35,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 8988cdee7..52ce1a7cf 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 @@ -1,13 +1,26 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[5]; +}; + uniform sampler2D texture0; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1.0; 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 3cea4288d..29e998152 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 8988cdee7..52ce1a7cf 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 @@ -1,13 +1,26 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[5]; +}; + uniform sampler2D texture0; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = texture(texture0, sphericalReflectionUv).rgb; float alphaComponent = 1.0; 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 3cea4288d..29e998152 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 4c4b4e2e7..28ef2ba5c 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[71]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 b5653f192..4c448ac8a 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 181b894cb..b06a4cda5 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[62]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 dc3e0a29e..594bdae6a 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 @@ -17,7 +17,6 @@ layout(location = 3) in vec3 in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -34,18 +33,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 181b894cb..b06a4cda5 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[62]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 dc3e0a29e..594bdae6a 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 @@ -17,7 +17,6 @@ layout(location = 3) in vec3 in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -34,18 +33,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 5c262b425..bb3e76bfb 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 5c262b425..bb3e76bfb 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 332835fbf..e2db40eef 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 4a7998a54..c2337a4c2 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[7]; +}; + struct Texture { sampler2D sampler; @@ -16,11 +24,16 @@ vec2 transformUv3d(mat4 transform3d, vec2 inUv) { uniform Texture texture0; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = texture(texture0.sampler, transformUv3d(texture0.transform3d, sphericalReflectionUv)).rgb; float alphaComponent = 1.0; 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 fe4a66df3..d4cfb7c5f 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 05f590b84..7628c340f 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[7]; +}; + struct Texture { sampler2D sampler; @@ -17,12 +25,17 @@ vec2 transformUv3d(mat4 transform3d, vec2 inUv) { uniform Texture texture0; uniform Texture texture1; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; in vec2 uv0; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = vec3(2.0)*texture(texture0.sampler, transformUv3d(texture0.transform3d, uv0)).rgb*texture(texture1.sampler, transformUv3d(texture1.transform3d, sphericalReflectionUv)).rgb; float alphaComponent = 1.0; 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 511b80501..4e97f150f 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 2b757c92c..b59c8bb47 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[7]; +}; + struct Texture { sampler2D sampler; @@ -16,12 +24,17 @@ vec2 transformUv3d(mat4 transform3d, vec2 inUv) { uniform Texture texture0; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; in vec4 vertexColor0; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = vec3(2.0)*vertexColor0.rgb*vec3(0.5) + texture(texture0.sampler, transformUv3d(texture0.transform3d, sphericalReflectionUv)).rgb*vec3(0.5); float alphaComponent = 0.34999999404*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 d77940a87..63dc4d027 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 @@ -18,7 +18,6 @@ layout(location = 5) in vec4 in_Color0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec4 vertexColor0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; vertexColor0 = in_Color0; } 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 05f590b84..7628c340f 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[7]; +}; + struct Texture { sampler2D sampler; @@ -17,12 +25,17 @@ vec2 transformUv3d(mat4 transform3d, vec2 inUv) { uniform Texture texture0; uniform Texture texture1; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; in vec2 uv0; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = vec3(2.0)*texture(texture0.sampler, transformUv3d(texture0.transform3d, uv0)).rgb*texture(texture1.sampler, transformUv3d(texture1.transform3d, sphericalReflectionUv)).rgb; float alphaComponent = 1.0; 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 511b80501..4e97f150f 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 05f590b84..7628c340f 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[7]; +}; + struct Texture { sampler2D sampler; @@ -17,12 +25,17 @@ vec2 transformUv3d(mat4 transform3d, vec2 inUv) { uniform Texture texture0; uniform Texture texture1; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; in vec2 uv0; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = vec3(2.0)*texture(texture0.sampler, transformUv3d(texture0.transform3d, uv0)).rgb*texture(texture1.sampler, transformUv3d(texture1.transform3d, sphericalReflectionUv)).rgb; float alphaComponent = 1.0; 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 511b80501..4e97f150f 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 05f590b84..7628c340f 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[7]; +}; + struct Texture { sampler2D sampler; @@ -17,12 +25,17 @@ vec2 transformUv3d(mat4 transform3d, vec2 inUv) { uniform Texture texture0; uniform Texture texture1; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; in vec2 uv0; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = vec3(2.0)*texture(texture0.sampler, transformUv3d(texture0.transform3d, uv0)).rgb*texture(texture1.sampler, transformUv3d(texture1.transform3d, sphericalReflectionUv)).rgb; float alphaComponent = 1.0; 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 511b80501..4e97f150f 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 181b894cb..2f5fb7021 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 2d1d819e1..2f896c1b5 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 2d1d819e1..2f896c1b5 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 2d1d819e1..2f896c1b5 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 2d1d819e1..2f896c1b5 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[4]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -32,7 +40,6 @@ uniform vec3 cameraPosition; uniform float shininess; uniform sampler2D texture0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 mergedLightDiffuseColor = vec4(0); vec4 mergedLightSpecularColor = vec4(0); getMergedLightColors(vertexPosition, fragNormal, shininess, mergedLightDiffuseColor, mergedLightSpecularColor); 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 f31827532..6b912223d 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/IP2V_damaind3.png b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/IP2V_damaind3.png index f6a6da6321ba76e5597298bb5ef2d2e7b2cb9989..1edf11bddf0477a8389278fe3c327f171cab4821 100644 GIT binary patch literal 8518 zcmV-MA-Ud(P)001EkNklFJSXdU~5_yS=;0t~IkNEBB0y%#3~CgYyKIW!dG-i1+>f&v~|U+z0=5_AmEYz0c?o z0}oAy>jVo$oF?roQ6IiBYXQ7zo|XA>OnJb~I{)|?-bHp(WV`qaoVMxph&cGixHDoy zx+`?15MmI<8IprZn@XKc?n{Vp_SYN^iA``H)flcZ$>OA# zj0o5fx^%savMhRaoZ~7_-}3F>Qf_d6lX#C(k!p+eF2gnrd!Q>OK|)?4Lk1IuV|sS> zVcaBPhfP1l0L^ofb(}auhrT^$jG2A1tLydYrNA@)yGuKOzr$#%AFzXKdFkiy?a-~T zv`g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2u_C diff --git a/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/enemy_2.png b/FinModelUtility/Formats/JSystem/JSystem Tests/goldens/pikmin_2_BigFoot/output/enemy_2.png index f6a6da6321ba76e5597298bb5ef2d2e7b2cb9989..1edf11bddf0477a8389278fe3c327f171cab4821 100644 GIT binary patch literal 8518 zcmV-MA-Ud(P)001EkNklFJSXdU~5_yS=;0t~IkNEBB0y%#3~CgYyKIW!dG-i1+>f&v~|U+z0=5_AmEYz0c?o z0}oAy>jVo$oF?roQ6IiBYXQ7zo|XA>OnJb~I{)|?-bHp(WV`qaoVMxph&cGixHDoy zx+`?15MmI<8IprZn@XKc?n{Vp_SYN^iA``H)flcZ$>OA# zj0o5fx^%savMhRaoZ~7_-}3F>Qf_d6lX#C(k!p+eF2gnrd!Q>OK|)?4Lk1IuV|sS> zVcaBPhfP1l0L^ofb(}auhrT^$jG2A1tLydYrNA@)yGuKOzr$#%AFzXKdFkiy?a-~T zv`gub0|#e7=#oVru}8ShDR&3lNOSfj!?bF^Tfj5Jo}qF@^(7bkTr~&>_y>Q$(jQXx z(fJ)QJEbYnODa*EDe*Ag0HXmz@bz(hBm%fF7|}lFq(-^T2OZ)GnjwOA@Ef%A46Rhk z1pF#jJ-iQRMyN}t!@!F#qCa#TZboQs@H9uSO6mn`cHA+h>#U9`*(cZ;4@>OrGx(hR zm}HX9h-!p#mr9SW!$O+(A5wVC#-FMZ{_0CkLi}lDUZX92jW>xKXOhBW4?SXPRc94^ zMthg5GP5e4HnDBI%XTYtf+RYuo^TQ6h09=(@sQz=wEb?5TAAiPi3w>({o_njc*zut zCBCkyCWC*V7f$){4mtC3S;Z}Fv(%>4;`(2(c8O<5`v}L%G{LPjp?d_D3H?*vJEr(c z{>QJWU2^vyk%-cdtJNZ|>c?Ft=u(~1>XLFfopLZFS|#BS++x9pdqZD8oib{38E2(J z{yEDd`Wea)O|k4!Eb;0a;vtf8d{Nvmy&CyG(Hy5&lwR{*gj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nlbdm>Q2--%J!hhqbtd2uY>GY0gk} zSvNq_#mYmU@jDcOdlKt(=d&xN&pk57KplYi4j${$T-o|%fzOs0tkFHj_E_B z1DxsDQ#;2#J%^F77O(QI1UQq0Iw*TXI2&Gts-xx)t5cHA@hcIbxTV@T4(uW76`we=bSXO5xg5&xnvQKesCIGIhd#sKQFpa6X5%vnqJz-qL5@&+?J#=s6 zPV<=#&JGBa7r3o((nHU<>DrQakx}vj+V-@Ms*SvhrlX^RT-Hx8>f-5I%rwsB8zgPb z8J541{fXU053@TFW~QcWH%E+dP^))4Z5Vs*FeRGoU<|Xp6&W&PUO)`QP zDf@LU=gy8*3=G>?b#Z=;9~T%O<2j4Q&s0)ifGrc;9Q$4Mh>8Hc3atb6tM5uII@muE z>EF!MyJS?$r1ovX66>zsy$jOm1w-0`*KM z6;DE)cCThQIWr}t&eNT!Q<-==a^5x_Jcenj3ryuaL>|&FeSbQ_@eGW7LNjY6M)Usw{ZVSY_bo+~00000NkvXXu0mjf D|2u_C 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 b5190dd48..474c77077 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[16]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -44,7 +52,6 @@ uniform vec3 color_GxMaterialColor0; uniform vec3 color_GxAmbientColor0; uniform float scalar_GxAlphaRegister0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -133,6 +140,8 @@ void main() { vec3 textureNormal = texture(normalTexture.sampler, normalTexture.transform2d * vec3((uv0).x, (uv0).y, 1)).xyz * 2.0 - 1.0; fragNormal = normalize(mat3(tangent, binormal, fragNormal) * textureNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 c6a287a8f..a66a2406a 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -35,19 +34,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 9366a0409..97042cdd1 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[2]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -41,7 +49,6 @@ uniform Texture texture1; uniform Texture texture2; uniform vec3 color_GxAmbientColor0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec4 vertexColor0; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 20cca764f..8d1d41116 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,6 @@ layout(location = 6) in vec4 in_Color0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; out vec2 uv1; out vec4 vertexColor0; @@ -38,20 +37,6 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; uv1 = in_Uv1; vertexColor0 = in_Color0; 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 51cb7ef60..90e211382 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[2]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -41,7 +49,6 @@ uniform Texture texture1; uniform sampler2D texture2; uniform vec3 color_GxAmbientColor0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec4 vertexColor0; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 20cca764f..8d1d41116 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,6 @@ layout(location = 6) in vec4 in_Color0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; out vec2 uv1; out vec4 vertexColor0; @@ -38,20 +37,6 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; uv1 = in_Uv1; vertexColor0 = in_Color0; 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 ba4b34181..a1d084b2c 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[2]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -36,7 +44,6 @@ uniform sampler2D texture2; uniform sampler2D texture3; uniform vec3 color_GxAmbientColor0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec4 vertexColor0; @@ -117,6 +124,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 20cca764f..8d1d41116 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,6 @@ layout(location = 6) in vec4 in_Color0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; out vec2 uv1; out vec4 vertexColor0; @@ -38,20 +37,6 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; uv1 = in_Uv1; vertexColor0 = in_Color0; 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 303193b4b..10c70a7de 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[14]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -44,7 +52,6 @@ uniform vec3 color_GxAmbientColor0; uniform vec3 color_GxColorRegister0; uniform float scalar_GxMaterialAlpha0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -123,6 +130,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 0c36f36d8..09191e04e 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 9f6db7ffd..958c91dc1 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[14]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -43,7 +51,6 @@ uniform vec3 color_GxMaterialColor1; uniform vec3 color_GxColorRegister3; uniform float scalar_GxMaterialAlpha1; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; @@ -121,6 +128,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 82d493ba0..1b40c8592 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 @@ -17,7 +17,6 @@ layout(location = 3) in float in_BoneWeights; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; void main() { mat4 mvMatrix = viewMatrix * modelMatrix; @@ -32,18 +31,4 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; } 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 1a9b13028..998ca349d 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[14]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -44,7 +52,6 @@ uniform vec3 color_GxAmbientColor1; uniform vec3 color_GxMaterialColor3; uniform float scalar_GxMaterialAlpha3; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -123,6 +130,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 0c36f36d8..09191e04e 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 3583d064c..ac62e7d59 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[19]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -36,7 +44,6 @@ uniform sampler2D texture2; uniform vec3 color_GxAmbientColor1; uniform float scalar_GxMaterialAlpha1; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec4 vertexColor0; @@ -116,6 +123,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 c362a7751..b9d533441 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 @@ -19,7 +19,6 @@ layout(location = 6) in vec4 in_Color0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; out vec4 vertexColor0; @@ -36,20 +35,6 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; vertexColor0 = in_Color0; } 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 71e8b69b9..953a471e0 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[19]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -44,7 +52,6 @@ uniform vec3 color_GxMaterialColor19; uniform vec3 color_GxAmbientColor19; uniform float scalar_GxMaterialAlpha19; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -123,6 +130,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 fdb34efda..b6419d1d8 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 239e074ab..ebcd5f6a6 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[19]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -36,7 +44,6 @@ uniform sampler2D texture2; uniform vec3 color_GxAmbientColor27; uniform float scalar_GxMaterialAlpha27; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec4 vertexColor0; @@ -116,6 +123,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 c362a7751..b9d533441 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 @@ -19,7 +19,6 @@ layout(location = 6) in vec4 in_Color0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; out vec4 vertexColor0; @@ -36,20 +35,6 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; vertexColor0 = in_Color0; } 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 bb43cd43d..5ac539d52 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[19]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -42,7 +50,6 @@ uniform vec3 color_GxMaterialColor3; uniform vec3 color_GxAmbientColor3; uniform float scalar_GxMaterialAlpha3; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -121,6 +128,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 fdb34efda..b6419d1d8 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 bcef01d88..4e7e5482d 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[19]; +}; + struct Texture { sampler2D sampler; @@ -10,12 +18,17 @@ struct Texture { uniform Texture texture0; uniform Texture texture1; -in vec2 sphericalReflectionUv; +in vec3 vertexNormal; in vec2 uv0; out vec4 fragColor; void main() { + // Have to renormalize because the vertex normals can become distorted when interpolated. + vec3 fragNormal = normalize(vertexNormal); + + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec3 colorComponent = clamp(clamp((texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb + vec3(-0.5))*vec3(0.5), 0.0, 1.0) + (texture(texture0.sampler, texture0.transform2d * vec3((uv0).x, (uv0).y, 1)).rgb + vec3(-0.5))*vec3(0.5)*(vec3(1.0) + vec3(-1.0)*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.0, 1.0); float alphaComponent = 0.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 fdb34efda..b6419d1d8 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 edafa1f59..9ccba9fc3 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[19]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -42,7 +50,6 @@ uniform Texture texture2; uniform vec3 color_GxAmbientColor47; uniform float scalar_GxMaterialAlpha47; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec4 vertexColor0; @@ -122,6 +129,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 c362a7751..b9d533441 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 @@ -19,7 +19,6 @@ layout(location = 6) in vec4 in_Color0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; out vec4 vertexColor0; @@ -36,20 +35,6 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; vertexColor0 = in_Color0; } 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 c995c2759..441072bda 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[19]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -42,7 +50,6 @@ uniform vec3 color_GxMaterialColor76; uniform vec3 color_GxAmbientColor76; uniform float scalar_GxMaterialAlpha76; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -121,6 +128,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 fdb34efda..b6419d1d8 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 0eaab5110..433e31087 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[19]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -44,7 +52,6 @@ uniform vec3 color_GxMaterialColor79; uniform vec3 color_GxAmbientColor79; uniform float scalar_GxMaterialAlpha79; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -123,6 +130,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 fdb34efda..b6419d1d8 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 @@ -18,7 +18,6 @@ layout(location = 4) in vec2 in_Uv0; out vec3 vertexPosition; out vec3 vertexNormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -34,19 +33,5 @@ void main() { vertexPosition = vec3(vertexModelMatrix * vec4(in_Position, 1)); vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 018fb424c..632914fc5 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[8]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -37,7 +45,6 @@ uniform vec3 color_GxAmbientColor0; uniform vec3 color_GxColorRegister0; uniform float scalar_GxMaterialAlpha0; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -116,6 +123,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 f953bfa03..5f8c48370 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 @@ -21,7 +21,6 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -39,19 +38,5 @@ void main() { vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(vertexModelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 37b72a393..68a3f323c 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[8]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -37,7 +45,6 @@ uniform vec3 color_GxAmbientColor2; uniform vec3 color_GxColorRegister6; uniform float scalar_GxMaterialAlpha2; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -116,6 +123,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 f953bfa03..5f8c48370 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 @@ -21,7 +21,6 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -39,19 +38,5 @@ void main() { vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(vertexModelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } 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 395537fbc..6e5155853 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 @@ -1,6 +1,14 @@ #version 310 es precision mediump float; +layout (std140, binding = 1) uniform Matrices { + mat4 modelMatrix; + mat4 viewMatrix; + mat4 projectionMatrix; + + mat4 boneMatrices[8]; +}; + struct Light { // 0x00 (vec3 needs to be 16-byte aligned) vec3 position; @@ -40,7 +48,6 @@ uniform vec3 color_GxColorRegister9; uniform float scalar_GxMaterialAlpha3; uniform float scalar_GxAlphaRegister11; -in vec2 sphericalReflectionUv; in vec3 vertexPosition; in vec3 vertexNormal; in vec2 uv0; @@ -119,6 +126,8 @@ void main() { // Have to renormalize because the vertex normals can become distorted when interpolated. vec3 fragNormal = normalize(vertexNormal); + vec2 sphericalReflectionUv = acos(normalize(projectionMatrix * viewMatrix * vec4(fragNormal, 0)).xy) / 3.14159; + vec4 individualLightDiffuseColors[8]; vec4 individualLightSpecularColors[8]; 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 f953bfa03..5f8c48370 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 @@ -21,7 +21,6 @@ out vec3 vertexPosition; out vec3 vertexNormal; out vec3 tangent; out vec3 binormal; -out vec2 sphericalReflectionUv; out vec2 uv0; void main() { @@ -39,19 +38,5 @@ void main() { vertexNormal = normalize(vertexModelMatrix * vec4(in_Normal, 0)).xyz; tangent = normalize(vertexModelMatrix * vec4(in_Tangent)).xyz; binormal = cross(vertexNormal, tangent); - - vec3 u = normalize( vec3( mvMatrix * mergedBoneMatrix * vec4(in_Position, 1)) ); - - mat3 normalMatrix = transpose(inverse(mat3(mvMatrix * mergedBoneMatrix))); - vec3 n = normalize( normalMatrix * in_Normal ); - - vec3 r = reflect( u, n ); - float m = 2. * sqrt( - pow( r.x, 2. ) + - pow( r.y, 2. ) + - pow( r.z + 1., 2. ) - ); - - sphericalReflectionUv = r.xy / m + .5; uv0 = in_Uv0; } diff --git a/FinModelUtility/Platforms/Gx/src/impl/GxFixedFunctionMaterial.cs b/FinModelUtility/Platforms/Gx/src/impl/GxFixedFunctionMaterial.cs index ace90b5a6..1c84e5769 100644 --- a/FinModelUtility/Platforms/Gx/src/impl/GxFixedFunctionMaterial.cs +++ b/FinModelUtility/Platforms/Gx/src/impl/GxFixedFunctionMaterial.cs @@ -85,13 +85,17 @@ var texCoordGen : null; var wrapModeOverrides = populatedMaterial.TextureWrapModeOverrides?[(int) textureIndex]; + + var wrapModeS = wrapModeOverrides?.wrapModeS ?? gxTexture.WrapModeS; + var wrapModeT = wrapModeOverrides?.wrapModeT ?? gxTexture.WrapModeT; + gxTexture = new GxTexture2d( gxTexture.Name, gxTexture.MipmapImages - .Select(BumpMapUtils.ConvertBumpMapImageToNormalImage) + .Select(i => BumpMapUtils.ConvertBumpMapImageToNormalImage(i, wrapModeS.ToFinWrapMode(), wrapModeT.ToFinWrapMode())) .ToArray(), - wrapModeOverrides?.wrapModeS ?? gxTexture.WrapModeS, - wrapModeOverrides?.wrapModeT ?? gxTexture.WrapModeT, + wrapModeS, + wrapModeT, gxTexture.MinTextureFilter, gxTexture.MagTextureFilter, gxTexture.ColorType);