mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix stain preview (√ + order)
This commit is contained in:
parent
69c493b9d6
commit
d84715ad27
2 changed files with 5 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ using ImGuiNET;
|
|||
using OtterGui.Widgets;
|
||||
using Penumbra.GameData.Data;
|
||||
using Penumbra.GameData.Files;
|
||||
using Penumbra.UI.AdvancedWindow;
|
||||
using Penumbra.Util;
|
||||
|
||||
namespace Penumbra.Services;
|
||||
|
|
@ -61,11 +62,11 @@ public class StainService : IDisposable
|
|||
|
||||
ImGui.SameLine();
|
||||
var frame = new Vector2(ImGui.GetTextLineHeight());
|
||||
ImGui.ColorButton("D", new Vector4(colors.Diffuse, 1), 0, frame);
|
||||
ImGui.ColorButton("D", new Vector4(ModEditWindow.PseudoSqrtRgb(colors.Diffuse), 1), 0, frame);
|
||||
ImGui.SameLine();
|
||||
ImGui.ColorButton("E", new Vector4(colors.Emissive, 1), 0, frame);
|
||||
ImGui.ColorButton("S", new Vector4(ModEditWindow.PseudoSqrtRgb(colors.Specular), 1), 0, frame);
|
||||
ImGui.SameLine();
|
||||
ImGui.ColorButton("S", new Vector4(colors.Specular, 1), 0, frame);
|
||||
ImGui.ColorButton("E", new Vector4(ModEditWindow.PseudoSqrtRgb(colors.Emissive), 1), 0, frame);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ public partial class ModEditWindow
|
|||
private static float PseudoSqrtRgb(float x)
|
||||
=> x < 0.0f ? -MathF.Sqrt(-x) : MathF.Sqrt(x);
|
||||
|
||||
private static Vector3 PseudoSqrtRgb(Vector3 vec)
|
||||
internal static Vector3 PseudoSqrtRgb(Vector3 vec)
|
||||
=> new(PseudoSqrtRgb(vec.X), PseudoSqrtRgb(vec.Y), PseudoSqrtRgb(vec.Z));
|
||||
|
||||
private static Vector4 PseudoSqrtRgb(Vector4 vec)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue