1
0
mirror of synced 2024-11-27 17:00:50 +01:00

Add material icons for transparent and translucent things.

This commit is contained in:
KillzXGaming 2019-05-30 21:42:23 -04:00
parent 2299a61cb3
commit 31b2ab8260
15 changed files with 67 additions and 3 deletions

Binary file not shown.

View File

@ -335,7 +335,6 @@ namespace FirstPlugin
shader = OpenTKSharedResources.shaders["BFRES_Normals"];
shader.UseProgram();
shader.SetMatrix4x4("camMtx", ref camMat);
shader.SetMatrix4x4("mtxProj", ref projMat);
shader.SetMatrix4x4("mtxCam", ref computedCamMtx);
@ -845,14 +844,44 @@ namespace FirstPlugin
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")
{
AglShaderTurbo aglShader = new AglShaderTurbo();
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;
}
}

View File

@ -109,6 +109,9 @@ namespace Switch_Toolbox.Library
imgList.Images.Add("folder", Properties.Resources.skeleton);
imgList.Images.Add("TextureMaterialMap", Properties.Resources.TextureMaterialMap);
imgList.Images.Add("MaterialTranslucent", Properties.Resources.materialSphereTranslucent);
imgList.Images.Add("MaterialTransparent", Properties.Resources.materialSphereTransparent);
//Data types
imgList.Images.Add("bool", Properties.Resources.IconBool);
imgList.Images.Add("buffer", Properties.Resources.IconBuffer);

View File

@ -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>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -367,4 +367,10 @@
<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>
</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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1083,6 +1083,12 @@
<ItemGroup>
<None Include="Resources\AlphaIconDisabled.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\materialSphereTranslucent.tif" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\materialSphereTransparent.tif" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>