Add material icons for transparent and translucent things.
This commit is contained in:
parent
2299a61cb3
commit
31b2ab8260
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -335,7 +335,6 @@ namespace FirstPlugin
|
|||||||
shader = OpenTKSharedResources.shaders["BFRES_Normals"];
|
shader = OpenTKSharedResources.shaders["BFRES_Normals"];
|
||||||
shader.UseProgram();
|
shader.UseProgram();
|
||||||
|
|
||||||
|
|
||||||
shader.SetMatrix4x4("camMtx", ref camMat);
|
shader.SetMatrix4x4("camMtx", ref camMat);
|
||||||
shader.SetMatrix4x4("mtxProj", ref projMat);
|
shader.SetMatrix4x4("mtxProj", ref projMat);
|
||||||
shader.SetMatrix4x4("mtxCam", ref computedCamMtx);
|
shader.SetMatrix4x4("mtxCam", ref computedCamMtx);
|
||||||
@ -845,14 +844,44 @@ namespace FirstPlugin
|
|||||||
|
|
||||||
private static void SetRenderPass(FMAT mat, SF.Shader shader, FSHP m, int id)
|
private static void SetRenderPass(FMAT mat, SF.Shader shader, FSHP m, int id)
|
||||||
{
|
{
|
||||||
|
bool IsTranslucent = false;
|
||||||
|
bool IsTransparentMask = false;
|
||||||
|
|
||||||
if (mat.shaderassign.ShaderArchive == "Turbo_UBER")
|
if (mat.shaderassign.ShaderArchive == "Turbo_UBER")
|
||||||
{
|
{
|
||||||
AglShaderTurbo aglShader = new AglShaderTurbo();
|
AglShaderTurbo aglShader = new AglShaderTurbo();
|
||||||
|
|
||||||
for (int i = 0; i < mat.renderinfo.Count; i++)
|
for (int i = 0; i < mat.renderinfo.Count; i++)
|
||||||
aglShader.LoadRenderInfo(mat.renderinfo[i]);
|
{
|
||||||
|
if (mat.renderinfo[i].Name == "gsys_render_state_mode")
|
||||||
|
{
|
||||||
|
IsTranslucent = mat.renderinfo[i].ValueString.Contains("translucent");
|
||||||
|
IsTransparentMask = mat.renderinfo[i].ValueString.Contains("mask");
|
||||||
|
}
|
||||||
|
|
||||||
// aglShader.LoadRenderPass(mat, shader);
|
aglShader.LoadRenderInfo(mat.renderinfo[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// aglShader.LoadRenderPass(mat, shader);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (mat.shaderassign.options.ContainsKey("enable_translucent"))
|
||||||
|
IsTranslucent = mat.shaderassign.options["enable_translucent"] == "1";
|
||||||
|
if (mat.shaderassign.options.ContainsKey("enable_translucent"))
|
||||||
|
IsTransparentMask = mat.shaderassign.options["enable_transparent"] == "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
SetMaterialIcon(mat, IsTranslucent, "MaterialTranslucent");
|
||||||
|
SetMaterialIcon(mat, IsTransparentMask, "MaterialTransparent");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void SetMaterialIcon(FMAT mat, bool IsEffect, string Key)
|
||||||
|
{
|
||||||
|
if (IsEffect)
|
||||||
|
{
|
||||||
|
mat.ImageKey = Key;
|
||||||
|
mat.SelectedImageKey = Key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -109,6 +109,9 @@ namespace Switch_Toolbox.Library
|
|||||||
imgList.Images.Add("folder", Properties.Resources.skeleton);
|
imgList.Images.Add("folder", Properties.Resources.skeleton);
|
||||||
imgList.Images.Add("TextureMaterialMap", Properties.Resources.TextureMaterialMap);
|
imgList.Images.Add("TextureMaterialMap", Properties.Resources.TextureMaterialMap);
|
||||||
|
|
||||||
|
imgList.Images.Add("MaterialTranslucent", Properties.Resources.materialSphereTranslucent);
|
||||||
|
imgList.Images.Add("MaterialTransparent", Properties.Resources.materialSphereTransparent);
|
||||||
|
|
||||||
//Data types
|
//Data types
|
||||||
imgList.Images.Add("bool", Properties.Resources.IconBool);
|
imgList.Images.Add("bool", Properties.Resources.IconBool);
|
||||||
imgList.Images.Add("buffer", Properties.Resources.IconBuffer);
|
imgList.Images.Add("buffer", Properties.Resources.IconBuffer);
|
||||||
|
@ -510,6 +510,26 @@ namespace Switch_Toolbox.Library.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
public static System.Drawing.Bitmap materialSphereTranslucent {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("materialSphereTranslucent", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
public static System.Drawing.Bitmap materialSphereTransparent {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("materialSphereTransparent", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -367,4 +367,10 @@
|
|||||||
<data name="UVPattern1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="UVPattern1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\UVPattern.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\UVPattern.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="materialSphereTranslucent" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\materialSphereTranslucent.tif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="materialSphereTransparent" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\materialSphereTransparent.tif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
BIN
Switch_Toolbox_Library/Resources/materialSphere.tga
Normal file
BIN
Switch_Toolbox_Library/Resources/materialSphere.tga
Normal file
Binary file not shown.
After Width: | Height: | Size: 256 KiB |
BIN
Switch_Toolbox_Library/Resources/materialSphereTranslucent.tif
Normal file
BIN
Switch_Toolbox_Library/Resources/materialSphereTranslucent.tif
Normal file
Binary file not shown.
BIN
Switch_Toolbox_Library/Resources/materialSphereTransparent.tif
Normal file
BIN
Switch_Toolbox_Library/Resources/materialSphereTransparent.tif
Normal file
Binary file not shown.
BIN
Switch_Toolbox_Library/Resources/materialTransparentSphere.png
Normal file
BIN
Switch_Toolbox_Library/Resources/materialTransparentSphere.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
Switch_Toolbox_Library/Resources/materialTransparentSphere.tif
Normal file
BIN
Switch_Toolbox_Library/Resources/materialTransparentSphere.tif
Normal file
Binary file not shown.
@ -1083,6 +1083,12 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\AlphaIconDisabled.png" />
|
<None Include="Resources\AlphaIconDisabled.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\materialSphereTranslucent.tif" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\materialSphereTransparent.tif" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user