diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 91ed7ff9..c07dd5a8 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index e9d4a0c1..95cb3f83 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 49bca7e9..6fcff6b1 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/GUI/BFRES/BfresEditor.cs b/Switch_FileFormatsMain/GUI/BFRES/BfresEditor.cs index d43af9b6..1a894754 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/BfresEditor.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/BfresEditor.cs @@ -156,6 +156,12 @@ namespace FirstPlugin.Forms public bool IsLoaded = false; + public void DisplayAllDDrawables() + { + if (viewport != null && Runtime.UseOpenGL && Runtime.DisplayViewport) + viewport.DisplayAllDDrawables(); + } + private BFRES ActiveBfres; public void LoadViewport(BFRES bfres, bool HasShapes, DrawableContainer ActiveDrawable, List customContextMenus = null) { diff --git a/Switch_FileFormatsMain/Main.cs b/Switch_FileFormatsMain/Main.cs index 728fcd31..c43e6952 100644 --- a/Switch_FileFormatsMain/Main.cs +++ b/Switch_FileFormatsMain/Main.cs @@ -248,6 +248,7 @@ namespace FirstPlugin { BfresEditor bfresEditor = (BfresEditor)LibraryGUI.Instance.GetActiveContent(typeof(BfresEditor)); bfresEditor.IsLoaded = false; + bfresEditor.DisplayAllDDrawables(); } } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 1b72291e..5ed22274 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 0bd30b77..5b93788c 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Switch_Toolbox_Library/Forms/Viewport.cs b/Switch_Toolbox_Library/Forms/Viewport.cs index ebf765af..3c005ccd 100644 --- a/Switch_Toolbox_Library/Forms/Viewport.cs +++ b/Switch_Toolbox_Library/Forms/Viewport.cs @@ -26,6 +26,8 @@ namespace Switch_Toolbox.Library Runtime.ViewportEditor editor; + public void DisplayAllDDrawables() { drawContainersCB.SelectedIndex = 0; } + public Viewport(List container, bool LoadDrawables = true) { DrawableContainers = container; diff --git a/Toolbox/Shader/Bfres/BFRES_PBR.frag b/Toolbox/Shader/Bfres/BFRES_PBR.frag index c32a5edd..ef402b32 100644 --- a/Toolbox/Shader/Bfres/BFRES_PBR.frag +++ b/Toolbox/Shader/Bfres/BFRES_PBR.frag @@ -243,12 +243,14 @@ void main() vec3 albedo = vec3(1); if (HasDiffuse == 1) - albedo = pow(texture(DiffuseMap , f_texcoord0).rgb, vec3(gamma)); + { + vec4 DiffuseTex = pow(texture(DiffuseMap, f_texcoord0).rgba, vec4(gamma)); - //Comp Selectors - albedo.r = GetComponent(RedChannel, texture(DiffuseMap, f_texcoord0)); - albedo.g = GetComponent(GreenChannel, texture(DiffuseMap, f_texcoord0)); - albedo.b = GetComponent(BlueChannel, texture(DiffuseMap, f_texcoord0)); + //Comp Selectors + albedo.r = GetComponent(RedChannel, DiffuseTex); + albedo.g = GetComponent(GreenChannel, DiffuseTex); + albedo.b = GetComponent(BlueChannel, DiffuseTex); + } float metallic = 0; if (HasMetalnessMap == 1)