diff --git a/3rdparty/casclib b/3rdparty/casclib index ca9a5c918..8ac182b2f 160000 --- a/3rdparty/casclib +++ b/3rdparty/casclib @@ -1 +1 @@ -Subproject commit ca9a5c9185d3448b380006bfb217bdb7b8490d4b +Subproject commit 8ac182b2fe1197bd979b6a08cf001508bb460d6f diff --git a/wowViewerLib/src/engine/objects/wmo/wmoObject.cpp b/wowViewerLib/src/engine/objects/wmo/wmoObject.cpp index ff8210742..8a8a3c891 100644 --- a/wowViewerLib/src/engine/objects/wmo/wmoObject.cpp +++ b/wowViewerLib/src/engine/objects/wmo/wmoObject.cpp @@ -937,8 +937,10 @@ void WmoObject::addSplitChildWMOsToView(InteriorView &interiorView, int groupId) int nextChildGroupIndex = parentMogp->parentSplitOrFirstChildGroupIndex; while (nextChildGroupIndex != -1) { auto &groupWmo = groupObjects[nextChildGroupIndex]; - if (!groupWmo->getIsLoaded()) + if (!groupWmo->getIsLoaded()) { + interiorView.wmoGroupArray.addToLoad(groupWmo); return; + } auto &mogp = groupWmo->getWmoGroupGeom()->mogp; if (!mogp->flags2.isSplitGroupChild) diff --git a/wowViewerLib/src/engine/shader/ShaderDefinitions.h b/wowViewerLib/src/engine/shader/ShaderDefinitions.h index 4b1a27618..cb83c67bf 100644 --- a/wowViewerLib/src/engine/shader/ShaderDefinitions.h +++ b/wowViewerLib/src/engine/shader/ShaderDefinitions.h @@ -36,63 +36,57 @@ extern const std::unordered_map shaderMetaInfo; extern const std::unordered_map> attributesPerShaderName; extern const std::unordered_map>> fieldDefMapPerShaderNameVert; extern const std::unordered_map>> fieldDefMapPerShaderNameFrag; -struct wmoShader { - enum class Attribute { - aPosition = 0, aNormal = 1, aTexCoord = 2, aTexCoord2 = 3, aTexCoord3 = 4, aTexCoord4 = 5, aColor = 6, aColor2 = 7, aColorSecond = 8, wmoShaderAttributeEnd - }; -}; - struct waterfallShader { enum class Attribute { aPosition = 0, aNormal = 1, bones = 2, boneWeights = 3, aTexCoord = 4, aTexCoord2 = 5, waterfallShaderAttributeEnd }; }; -struct ribbonShader { +struct adtLodShader { enum class Attribute { - aPosition = 0, aColor = 1, aTexcoord0 = 2, ribbonShaderAttributeEnd + aHeight = 0, aIndex = 1, adtLodShaderAttributeEnd }; }; -struct drawQuad { +struct adtShader { enum class Attribute { - position = 0, drawQuadAttributeEnd + aHeight = 0, aColor = 1, aVertexLighting = 2, aNormal = 3, aIndex = 4, adtShaderAttributeEnd }; }; -struct m2ParticleShader { +struct drawBBShader { enum class Attribute { - aPosition = 0, aColor = 1, aTexcoord0 = 2, aTexcoord1 = 3, aTexcoord2 = 4, m2ParticleShaderAttributeEnd + aPosition = 0, drawBBShaderAttributeEnd }; }; -struct drawPortalShader { +struct waterShader { enum class Attribute { - aPosition = 0, drawPortalShaderAttributeEnd + aPositionTransp = 0, aTexCoord = 1, waterShaderAttributeEnd }; }; -struct waterShader { +struct m2ParticleShader { enum class Attribute { - aPositionTransp = 0, aTexCoord = 1, waterShaderAttributeEnd + aPosition = 0, aColor = 1, aTexcoord0 = 2, aTexcoord1 = 3, aTexcoord2 = 4, m2ParticleShaderAttributeEnd }; }; -struct renderFrameBufferShader { +struct drawFrustumShader { enum class Attribute { - a_position = 0, renderFrameBufferShaderAttributeEnd + aPosition = 0, drawFrustumShaderAttributeEnd }; }; -struct drawLinesShader { +struct drawPoints { enum class Attribute { - aPosition = 0, drawLinesShaderAttributeEnd + aPosition = 0, drawPointsAttributeEnd }; }; -struct drawFrustumShader { +struct drawQuad { enum class Attribute { - aPosition = 0, drawFrustumShaderAttributeEnd + position = 0, drawQuadAttributeEnd }; }; @@ -102,93 +96,86 @@ struct skyConus { }; }; -struct adtShader { +struct m2Shader { enum class Attribute { - aHeight = 0, aColor = 1, aVertexLighting = 2, aNormal = 3, aIndex = 4, adtShaderAttributeEnd + aPosition = 0, aNormal = 1, bones = 2, boneWeights = 3, aTexCoord = 4, aTexCoord2 = 5, m2ShaderAttributeEnd }; }; -struct m2Shader { +struct drawPortalShader { enum class Attribute { - aPosition = 0, aNormal = 1, bones = 2, boneWeights = 3, aTexCoord = 4, aTexCoord2 = 5, m2ShaderAttributeEnd + aPosition = 0, drawPortalShaderAttributeEnd }; }; -struct imguiShader { +struct renderFrameBufferShader { enum class Attribute { - Position = 0, UV = 1, Color = 2, imguiShaderAttributeEnd + a_position = 0, renderFrameBufferShaderAttributeEnd }; }; -struct drawPoints { +struct wmoShader { enum class Attribute { - aPosition = 0, drawPointsAttributeEnd + aPosition = 0, aNormal = 1, aTexCoord = 2, aTexCoord2 = 3, aTexCoord3 = 4, aTexCoord4 = 5, aColor = 6, aColor2 = 7, aColorSecond = 8, wmoShaderAttributeEnd }; }; -struct drawBBShader { +struct imguiShader { enum class Attribute { - aPosition = 0, drawBBShaderAttributeEnd + Position = 0, UV = 1, Color = 2, imguiShaderAttributeEnd }; }; -struct adtLodShader { +struct drawLinesShader { enum class Attribute { - aHeight = 0, aIndex = 1, adtLodShaderAttributeEnd + aPosition = 0, drawLinesShaderAttributeEnd + }; +}; + +struct ribbonShader { + enum class Attribute { + aPosition = 0, aColor = 1, aTexcoord0 = 2, ribbonShaderAttributeEnd }; }; std::string loadShader(std::string shaderName); #ifdef SHADERDATACPP const std::unordered_map> attributesPerShaderName = { -{"wmoShader", { -{"aPosition", 0}, -{"aNormal", 1}, -{"aTexCoord", 2}, -{"aTexCoord2", 3}, -{"aTexCoord3", 4}, -{"aTexCoord4", 5}, -{"aColor", 6}, -{"aColor2", 7}, -{"aColorSecond", 8}, -}},{"waterfallShader", { +{"waterfallShader", { {"aPosition", 0}, {"aNormal", 1}, {"bones", 2}, {"boneWeights", 3}, {"aTexCoord", 4}, {"aTexCoord2", 5}, -}},{"ribbonShader", { -{"aPosition", 0}, +}},{"adtLodShader", { +{"aHeight", 0}, +{"aIndex", 1}, +}},{"adtShader", { +{"aHeight", 0}, {"aColor", 1}, -{"aTexcoord0", 2}, -}},{"drawQuad", { -{"position", 0}, +{"aVertexLighting", 2}, +{"aNormal", 3}, +{"aIndex", 4}, +}},{"drawBBShader", { +{"aPosition", 0}, +}},{"waterShader", { +{"aPositionTransp", 0}, +{"aTexCoord", 1}, }},{"m2ParticleShader", { {"aPosition", 0}, {"aColor", 1}, {"aTexcoord0", 2}, {"aTexcoord1", 3}, {"aTexcoord2", 4}, -}},{"drawPortalShader", { -{"aPosition", 0}, -}},{"waterShader", { -{"aPositionTransp", 0}, -{"aTexCoord", 1}, -}},{"renderFrameBufferShader", { -{"a_position", 0}, -}},{"drawLinesShader", { -{"aPosition", 0}, }},{"drawFrustumShader", { {"aPosition", 0}, +}},{"drawPoints", { +{"aPosition", 0}, +}},{"drawQuad", { +{"position", 0}, }},{"skyConus", { {"aPosition", 0}, -}},{"adtShader", { -{"aHeight", 0}, -{"aColor", 1}, -{"aVertexLighting", 2}, -{"aNormal", 3}, -{"aIndex", 4}, }},{"m2Shader", { {"aPosition", 0}, {"aNormal", 1}, @@ -196,17 +183,30 @@ const std::unordered_map> attributesPe {"boneWeights", 3}, {"aTexCoord", 4}, {"aTexCoord2", 5}, +}},{"drawPortalShader", { +{"aPosition", 0}, +}},{"renderFrameBufferShader", { +{"a_position", 0}, +}},{"wmoShader", { +{"aPosition", 0}, +{"aNormal", 1}, +{"aTexCoord", 2}, +{"aTexCoord2", 3}, +{"aTexCoord3", 4}, +{"aTexCoord4", 5}, +{"aColor", 6}, +{"aColor2", 7}, +{"aColorSecond", 8}, }},{"imguiShader", { {"Position", 0}, {"UV", 1}, {"Color", 2}, -}},{"drawPoints", { +}},{"drawLinesShader", { {"aPosition", 0}, -}},{"drawBBShader", { +}},{"ribbonShader", { {"aPosition", 0}, -}},{"adtLodShader", { -{"aHeight", 0}, -{"aIndex", 1}, +{"aColor", 1}, +{"aTexcoord0", 2}, }},}; const std::unordered_map shaderMetaInfo = {{ "wmoShader.vert.spv", { @@ -223,10 +223,9 @@ const std::unordered_map shaderMetaInfo = {{ "wmoSh {0,4,32}, } } -},{ "waterfallShader.vert.spv", { +},{ "waterShader.frag.spv", { { -{0,2,144}, -{0,1,14144}, +{0,4,16}, {0,0,368}, } } @@ -237,129 +236,109 @@ const std::unordered_map shaderMetaInfo = {{ "wmoSh {0,1,14144}, } } -},{ "skyConus.frag.spv", { -{ -} -} -},{ "ribbonShader.frag.spv", { +},{ "adtShader.vert.spv", { { -{0,4,48}, {0,0,368}, +{0,2,16}, } } -},{ "renderFrameBufferShader.vert.spv", { -{ -} -} -},{ "waterShader.frag.spv", { +},{ "adtLodShader.vert.spv", { { -{0,4,16}, -{0,0,368}, +{0,0,144}, } } -},{ "m2Shader.vert.spv", { +},{ "waterfallShader.vert.spv", { { +{0,2,144}, {0,1,14144}, -{0,2,160}, {0,0,368}, } } -},{ "drawLinesShader.frag.spv", { -{ -{0,1,12}, -} -} -},{ "m2Shader.frag.spv", { +},{ "drawPoints.vert.spv", { { -{0,4,64}, -{0,3,256}, -{0,0,368}, -{0,1,14144}, +{0,0,128}, +{0,1,64}, } } -},{ "adtShader.vert.spv", { +},{ "drawFrustumShader.vert.spv", { { -{0,0,368}, -{0,2,16}, +{0,0,128}, } } -},{ "drawLinesShader.vert.spv", { +},{ "ffxglow.frag.spv", { { -{0,0,128}, +{0,4,16}, } } -},{ "m2ParticleShader.vert.spv", { +},{ "adtShader.frag.spv", { { +{0,4,288}, +{0,3,16}, {0,0,368}, } } -},{ "skyConus.vert.spv", { +},{ "drawBBShader.vert.spv", { { +{0,1,112}, {0,0,368}, -{0,2,96}, } } -},{ "m2ParticleShader.frag.spv", { +},{ "drawFrustumShader.frag.spv", { { -{0,4,32}, -{0,0,368}, +{0,2,12}, } } -},{ "imguiShader.frag.spv", { +},{ "drawDepthShader.frag.spv", { { +{0,2,12}, } } -},{ "ffxglow.frag.spv", { +},{ "adtLodShader.frag.spv", { { -{0,4,16}, +{0,0,84}, } } -},{ "ffxgauss4.frag.spv", { +},{ "drawPoints.frag.spv", { { -{0,4,32}, +{0,1,12}, } } -},{ "drawFrustumShader.frag.spv", { +},{ "drawBBShader.frag.spv", { { -{0,2,12}, +{0,1,112}, } } -},{ "drawPoints.vert.spv", { +},{ "drawLinesShader.frag.spv", { { -{0,0,128}, -{0,1,64}, +{0,1,12}, } } -},{ "drawPoints.frag.spv", { +},{ "skyConus.frag.spv", { { -{0,1,12}, } } -},{ "adtShader.frag.spv", { +},{ "drawPortalShader.frag.spv", { { -{0,4,288}, -{0,3,16}, -{0,0,368}, +{0,4,16}, } } -},{ "drawFrustumShader.vert.spv", { +},{ "drawLinesShader.vert.spv", { { {0,0,128}, } } -},{ "ribbonShader.vert.spv", { +},{ "ffxgauss4.frag.spv", { { -{0,0,368}, +{0,4,32}, } } -},{ "drawBBShader.frag.spv", { +},{ "imguiShader.frag.spv", { { -{0,1,112}, } } -},{ "drawPortalShader.frag.spv", { +},{ "m2ParticleShader.vert.spv", { { -{0,4,16}, +{0,0,368}, } } },{ "drawQuad.vert.spv", { @@ -367,149 +346,122 @@ const std::unordered_map shaderMetaInfo = {{ "wmoSh {0,2,16}, } } -},{ "adtLodShader.frag.spv", { +},{ "imguiShader.vert.spv", { { -{0,0,84}, +{0,1,80}, } } -},{ "drawBBShader.vert.spv", { +},{ "m2Shader.frag.spv", { { -{0,1,112}, +{0,4,64}, +{0,3,256}, {0,0,368}, +{0,1,14144}, } } -},{ "renderFrameBufferShader.frag.spv", { +},{ "waterShader.vert.spv", { { -{0,2,168}, +{0,0,368}, +{0,1,64}, } } -},{ "imguiShader.vert.spv", { +},{ "drawPortalShader.vert.spv", { { -{0,1,80}, +{0,0,128}, } } -},{ "drawPortalShader.vert.spv", { +},{ "ribbonShader.vert.spv", { { -{0,0,128}, +{0,0,368}, } } -},{ "waterShader.vert.spv", { +},{ "skyConus.vert.spv", { { {0,0,368}, -{0,1,64}, +{0,2,96}, } } -},{ "drawDepthShader.frag.spv", { +},{ "renderFrameBufferShader.frag.spv", { { -{0,2,12}, +{0,2,168}, } } -},{ "adtLodShader.vert.spv", { +},{ "renderFrameBufferShader.vert.spv", { { -{0,0,144}, +} +} +},{ "m2ParticleShader.frag.spv", { +{ +{0,4,32}, +{0,0,368}, +} +} +},{ "m2Shader.vert.spv", { +{ +{0,1,14144}, +{0,2,160}, +{0,0,368}, +} +} +},{ "ribbonShader.frag.spv", { +{ +{0,4,48}, +{0,0,368}, } } },}; const std::unordered_map>> fieldDefMapPerShaderNameVert = { - {"adtLodShader", { + {"waterfallShader", { { 0, { - {"_55_uPos", true, 0, 1, 3, 0}, - {"_55_uLookAtMat", true, 16, 4, 4, 0}, - {"_55_uPMatrix", true, 80, 4, 4, 0}, + {"_199_scene_uLookAtMat", true, 0, 4, 4, 0}, + {"_199_scene_uPMatrix", true, 64, 4, 4, 0}, + {"_199_scene_uViewUp", true, 128, 1, 4, 0}, + {"_199_scene_uInteriorSunDir", true, 144, 1, 4, 0}, + {"_199_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, + {"_199_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, + {"_199_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, + {"_199_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, + {"_199_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, + {"_199_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, + {"_199_fogData_densityParams", true, 256, 1, 4, 0}, + {"_199_fogData_heightPlane", true, 272, 1, 4, 0}, + {"_199_fogData_color_and_heightRate", true, 288, 1, 4, 0}, + {"_199_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, + {"_199_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, + {"_199_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, + {"_199_fogData_sunPercentage", true, 352, 1, 4, 0}, } }, - }}, - {"drawBBShader", { { 1, { - {"_21_uPlacementMat", true, 0, 4, 4, 0}, - {"_21_uBBScale", true, 64, 1, 4, 0}, - {"_21_uBBCenter", true, 80, 1, 4, 0}, - {"_21_uColor", true, 96, 1, 4, 0}, + {"_104_uPlacementMat", true, 0, 4, 4, 0}, + {"_104_uBoneMatrixes[0]", true, 64, 4, 4, 220}, } }, { - 0, { - {"_62_scene_uLookAtMat", true, 0, 4, 4, 0}, - {"_62_scene_uPMatrix", true, 64, 4, 4, 0}, - {"_62_scene_uViewUp", true, 128, 1, 4, 0}, - {"_62_scene_uInteriorSunDir", true, 144, 1, 4, 0}, - {"_62_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, - {"_62_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, - {"_62_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, - {"_62_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, - {"_62_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, - {"_62_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, - {"_62_fogData_densityParams", true, 256, 1, 4, 0}, - {"_62_fogData_heightPlane", true, 272, 1, 4, 0}, - {"_62_fogData_color_and_heightRate", true, 288, 1, 4, 0}, - {"_62_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, - {"_62_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, - {"_62_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, - {"_62_fogData_sunPercentage", true, 352, 1, 4, 0}, + 2, { + {"_55_bumpScale", true, 0, 1, 4, 0}, + {"_55_uTextMat[0]", true, 16, 4, 4, 2}, } }, }}, - {"drawPoints", { + {"adtLodShader", { { 0, { - {"_19_uLookAtMat", true, 0, 4, 4, 0}, - {"_19_uPMatrix", true, 64, 4, 4, 0}, - } - }, - { - 1, { - {"_29_uPlacementMat", true, 0, 4, 4, 0}, - } - }, - }}, - {"imguiShader", { - { - 1, { - {"_30_ProjMtx", true, 0, 4, 4, 0}, - {"_30_uiScale", true, 64, 1, 4, 0}, + {"_55_uPos", true, 0, 1, 3, 0}, + {"_55_uLookAtMat", true, 16, 4, 4, 0}, + {"_55_uPMatrix", true, 80, 4, 4, 0}, } }, }}, - {"m2Shader", { - { - 1, { - {"_133_uPlacementMat", true, 0, 4, 4, 0}, - {"_133_uBoneMatrixes[0]", true, 64, 4, 4, 220}, - } - }, + {"adtShader", { { 2, { - {"_230_vertexShader_IsAffectedByLight", false, 0, 1, 4, 0}, - {"_230_color_Transparency", true, 16, 1, 4, 0}, - {"_230_uTextMat[0]", true, 32, 4, 4, 2}, - } - }, - { - 0, { - {"_240_scene_uLookAtMat", true, 0, 4, 4, 0}, - {"_240_scene_uPMatrix", true, 64, 4, 4, 0}, - {"_240_scene_uViewUp", true, 128, 1, 4, 0}, - {"_240_scene_uInteriorSunDir", true, 144, 1, 4, 0}, - {"_240_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, - {"_240_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, - {"_240_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, - {"_240_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, - {"_240_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, - {"_240_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, - {"_240_fogData_densityParams", true, 256, 1, 4, 0}, - {"_240_fogData_heightPlane", true, 272, 1, 4, 0}, - {"_240_fogData_color_and_heightRate", true, 288, 1, 4, 0}, - {"_240_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, - {"_240_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, - {"_240_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, - {"_240_fogData_sunPercentage", true, 352, 1, 4, 0}, + {"_139_uPos", true, 0, 1, 4, 0}, } }, - }}, - {"adtShader", { { 0, { {"_91_scene_uLookAtMat", true, 0, 4, 4, 0}, @@ -531,59 +483,44 @@ const std::unordered_map>> fieldDefMapPerShaderNameFrag = { - {"adtLodShader", { + {"imguiShader", { { - 0, { - {"_65_uViewUp", true, 0, 1, 4, 0}, - {"_65_uSunDir_FogStart", true, 16, 1, 4, 0}, - {"_65_uSunColor_uFogEnd", true, 32, 1, 4, 0}, - {"_65_uAmbientLight", true, 48, 1, 4, 0}, - {"_65_FogColor", true, 64, 1, 4, 0}, - {"_65_uNewFormula", false, 80, 1, 1, 0}, + 1, { + {"_30_ProjMtx", true, 0, 4, 4, 0}, + {"_30_uiScale", true, 64, 1, 4, 0}, } }, }}, - {"ffxglow", { + {"drawLinesShader", { { - 4, { - {"_34_blurAmount", true, 0, 1, 4, 0}, + 0, { + {"_19_uLookAtMat", true, 0, 4, 4, 0}, + {"_19_uPMatrix", true, 64, 4, 4, 0}, } }, }}, - {"adtShader", { - { - 4, { - {"_466_uHeightScale", true, 0, 1, 4, 0}, - {"_466_uHeightOffset", true, 16, 1, 4, 0}, - {"_466_animationMat[0]", true, 32, 4, 4, 4}, - } - }, - { - 3, { - {"_506_uUseHeightMixFormula", false, 0, 1, 4, 0}, - } - }, + {"ribbonShader", { { 0, { - {"_748_scene_uLookAtMat", true, 0, 4, 4, 0}, - {"_748_scene_uPMatrix", true, 64, 4, 4, 0}, - {"_748_scene_uViewUp", true, 128, 1, 4, 0}, - {"_748_scene_uInteriorSunDir", true, 144, 1, 4, 0}, - {"_748_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, - {"_748_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, - {"_748_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, - {"_748_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, - {"_748_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, - {"_748_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, - {"_748_fogData_densityParams", true, 256, 1, 4, 0}, - {"_748_fogData_heightPlane", true, 272, 1, 4, 0}, - {"_748_fogData_color_and_heightRate", true, 288, 1, 4, 0}, - {"_748_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, - {"_748_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, - {"_748_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, - {"_748_fogData_sunPercentage", true, 352, 1, 4, 0}, + {"_37_scene_uLookAtMat", true, 0, 4, 4, 0}, + {"_37_scene_uPMatrix", true, 64, 4, 4, 0}, + {"_37_scene_uViewUp", true, 128, 1, 4, 0}, + {"_37_scene_uInteriorSunDir", true, 144, 1, 4, 0}, + {"_37_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, + {"_37_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, + {"_37_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, + {"_37_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, + {"_37_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, + {"_37_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, + {"_37_fogData_densityParams", true, 256, 1, 4, 0}, + {"_37_fogData_heightPlane", true, 272, 1, 4, 0}, + {"_37_fogData_color_and_heightRate", true, 288, 1, 4, 0}, + {"_37_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, + {"_37_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, + {"_37_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, + {"_37_fogData_sunPercentage", true, 352, 1, 4, 0}, } }, }}, - {"m2Shader", { - { - 4, { - {"_473_PixelShader_UnFogged_IsAffectedByLight_blendMode", false, 0, 1, 4, 0}, - {"_473_uFogColorAndAlphaTest", true, 16, 1, 4, 0}, - {"_473_uTexSampleAlpha", true, 32, 1, 4, 0}, - {"_473_uPcColor", true, 48, 1, 4, 0}, - } - }, +}; +const std::unordered_map>> fieldDefMapPerShaderNameFrag = { + {"waterfallShader", { { - 3, { - {"_496_intLight_uInteriorAmbientColorAndApplyInteriorLight", true, 0, 1, 4, 0}, - {"_496_intLight_uInteriorDirectColorAndApplyExteriorLight", true, 16, 1, 4, 0}, - {"_496_pc_lights[0].color", true, 32, 1, 4, 0}, - {"_496_pc_lights[0].position", true, 48, 1, 4, 0}, - {"_496_pc_lights[0].attenuation", true, 64, 1, 4, 0}, - {"_496_pc_lights[1].color", true, 80, 1, 4, 0}, - {"_496_pc_lights[1].position", true, 96, 1, 4, 0}, - {"_496_pc_lights[1].attenuation", true, 112, 1, 4, 0}, - {"_496_pc_lights[2].color", true, 128, 1, 4, 0}, - {"_496_pc_lights[2].position", true, 144, 1, 4, 0}, - {"_496_pc_lights[2].attenuation", true, 160, 1, 4, 0}, - {"_496_pc_lights[3].color", true, 176, 1, 4, 0}, - {"_496_pc_lights[3].position", true, 192, 1, 4, 0}, - {"_496_pc_lights[3].attenuation", true, 208, 1, 4, 0}, - {"_496_lightCountAndBcHack", false, 224, 1, 4, 0}, - {"_496_interiorExteriorBlend", true, 240, 1, 4, 0}, + 1, { + {"_818_uPlacementMat", true, 0, 4, 4, 0}, + {"_818_uBoneMatrixes[0]", true, 64, 4, 4, 220}, } }, { 0, { - {"_535_scene_uLookAtMat", true, 0, 4, 4, 0}, - {"_535_scene_uPMatrix", true, 64, 4, 4, 0}, - {"_535_scene_uViewUp", true, 128, 1, 4, 0}, - {"_535_scene_uInteriorSunDir", true, 144, 1, 4, 0}, - {"_535_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, - {"_535_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, - {"_535_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, - {"_535_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, - {"_535_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, - {"_535_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, - {"_535_fogData_densityParams", true, 256, 1, 4, 0}, - {"_535_fogData_heightPlane", true, 272, 1, 4, 0}, - {"_535_fogData_color_and_heightRate", true, 288, 1, 4, 0}, - {"_535_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, - {"_535_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, - {"_535_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, - {"_535_fogData_sunPercentage", true, 352, 1, 4, 0}, + {"_709_scene_uLookAtMat", true, 0, 4, 4, 0}, + {"_709_scene_uPMatrix", true, 64, 4, 4, 0}, + {"_709_scene_uViewUp", true, 128, 1, 4, 0}, + {"_709_scene_uInteriorSunDir", true, 144, 1, 4, 0}, + {"_709_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, + {"_709_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, + {"_709_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, + {"_709_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, + {"_709_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, + {"_709_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, + {"_709_fogData_densityParams", true, 256, 1, 4, 0}, + {"_709_fogData_heightPlane", true, 272, 1, 4, 0}, + {"_709_fogData_color_and_heightRate", true, 288, 1, 4, 0}, + {"_709_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, + {"_709_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, + {"_709_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, + {"_709_fogData_sunPercentage", true, 352, 1, 4, 0}, } }, { - 1, { - {"_543_uPlacementMat", true, 0, 4, 4, 0}, - {"_543_uBoneMatrixes[0]", true, 64, 4, 4, 220}, + 4, { + {"_445_values0", true, 0, 1, 4, 0}, + {"_445_values1", true, 16, 1, 4, 0}, + {"_445_values2", true, 32, 1, 4, 0}, + {"_445_values3", true, 48, 1, 4, 0}, + {"_445_values4", true, 64, 1, 4, 0}, + {"_445_baseColor", true, 80, 1, 4, 0}, } }, }}, - {"skyConus", { - }}, - {"ffxgauss4", { + {"adtLodShader", { { - 4, { - {"_33_texOffsetX", true, 0, 1, 4, 0}, - {"_33_texOffsetY", true, 16, 1, 4, 0}, + 0, { + {"_65_uViewUp", true, 0, 1, 4, 0}, + {"_65_uSunDir_FogStart", true, 16, 1, 4, 0}, + {"_65_uSunColor_uFogEnd", true, 32, 1, 4, 0}, + {"_65_uAmbientLight", true, 48, 1, 4, 0}, + {"_65_FogColor", true, 64, 1, 4, 0}, + {"_65_uNewFormula", false, 80, 1, 1, 0}, } }, }}, - {"drawDepthShader", { + {"renderFrameBufferShader", { { 2, { - {"_10_drawDepth", false, 0, 1, 1, 0}, - {"_10_uFarPlane", true, 4, 1, 1, 0}, - {"_10_uNearPlane", true, 8, 1, 1, 0}, + {"_34_gauss_offsets[0]", true, 0, 1, 1, 5}, + {"_34_gauss_weights[0]", true, 80, 1, 1, 5}, + {"_34_uResolution", true, 160, 1, 2, 0}, } }, }}, - {"waterfallShader", { + {"drawPortalShader", { { 4, { - {"_445_values0", true, 0, 1, 4, 0}, - {"_445_values1", true, 16, 1, 4, 0}, - {"_445_values2", true, 32, 1, 4, 0}, - {"_445_values3", true, 48, 1, 4, 0}, - {"_445_values4", true, 64, 1, 4, 0}, - {"_445_baseColor", true, 80, 1, 4, 0}, + {"_12_uColor", true, 0, 1, 4, 0}, } }, + }}, + {"adtShader", { { 0, { - {"_709_scene_uLookAtMat", true, 0, 4, 4, 0}, - {"_709_scene_uPMatrix", true, 64, 4, 4, 0}, - {"_709_scene_uViewUp", true, 128, 1, 4, 0}, - {"_709_scene_uInteriorSunDir", true, 144, 1, 4, 0}, - {"_709_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, - {"_709_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, - {"_709_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, - {"_709_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, - {"_709_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, - {"_709_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, - {"_709_fogData_densityParams", true, 256, 1, 4, 0}, - {"_709_fogData_heightPlane", true, 272, 1, 4, 0}, - {"_709_fogData_color_and_heightRate", true, 288, 1, 4, 0}, - {"_709_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, - {"_709_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, - {"_709_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, - {"_709_fogData_sunPercentage", true, 352, 1, 4, 0}, + {"_748_scene_uLookAtMat", true, 0, 4, 4, 0}, + {"_748_scene_uPMatrix", true, 64, 4, 4, 0}, + {"_748_scene_uViewUp", true, 128, 1, 4, 0}, + {"_748_scene_uInteriorSunDir", true, 144, 1, 4, 0}, + {"_748_scene_extLight_uExteriorAmbientColor", true, 160, 1, 4, 0}, + {"_748_scene_extLight_uExteriorHorizontAmbientColor", true, 176, 1, 4, 0}, + {"_748_scene_extLight_uExteriorGroundAmbientColor", true, 192, 1, 4, 0}, + {"_748_scene_extLight_uExteriorDirectColor", true, 208, 1, 4, 0}, + {"_748_scene_extLight_uExteriorDirectColorDir", true, 224, 1, 4, 0}, + {"_748_scene_extLight_adtSpecMult", true, 240, 1, 4, 0}, + {"_748_fogData_densityParams", true, 256, 1, 4, 0}, + {"_748_fogData_heightPlane", true, 272, 1, 4, 0}, + {"_748_fogData_color_and_heightRate", true, 288, 1, 4, 0}, + {"_748_fogData_heightDensity_and_endColor", true, 304, 1, 4, 0}, + {"_748_fogData_sunAngle_and_sunColor", true, 320, 1, 4, 0}, + {"_748_fogData_heightColor_and_endFogDistance", true, 336, 1, 4, 0}, + {"_748_fogData_sunPercentage", true, 352, 1, 4, 0}, } }, { - 1, { - {"_818_uPlacementMat", true, 0, 4, 4, 0}, - {"_818_uBoneMatrixes[0]", true, 64, 4, 4, 220}, + 3, { + {"_506_uUseHeightMixFormula", false, 0, 1, 4, 0}, + } + }, + { + 4, { + {"_466_uHeightScale", true, 0, 1, 4, 0}, + {"_466_uHeightOffset", true, 16, 1, 4, 0}, + {"_466_animationMat[0]", true, 32, 4, 4, 4}, } }, }}, @@ -921,19 +854,33 @@ const std::unordered_map