mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Material editor: better color constants
This commit is contained in:
parent
b8d09ab660
commit
9364ecccd2
2 changed files with 3 additions and 3 deletions
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
|||
Subproject commit 1e172ee9a0f5946d67b848a36b2be97f6541453f
|
||||
Subproject commit c8394607addd29cb7f8ae3257f635a4486c40a63
|
||||
|
|
@ -148,7 +148,7 @@ public partial class ModEditWindow
|
|||
var value = new Vector3(values);
|
||||
if (_squaredRgb)
|
||||
value = Vector3.SquareRoot(value);
|
||||
if (ImGui.ColorEdit3("##0", ref value) && !disabled)
|
||||
if (ImGui.ColorEdit3("##0", ref value, ImGuiColorEditFlags.Float | (_clamped ? 0 : ImGuiColorEditFlags.HDR)) && !disabled)
|
||||
{
|
||||
if (_squaredRgb)
|
||||
value *= value;
|
||||
|
|
@ -166,7 +166,7 @@ public partial class ModEditWindow
|
|||
var value = new Vector4(values);
|
||||
if (_squaredRgb)
|
||||
value = new Vector4(MathF.Sqrt(value.X), MathF.Sqrt(value.Y), MathF.Sqrt(value.Z), value.W);
|
||||
if (ImGui.ColorEdit4("##0", ref value) && !disabled)
|
||||
if (ImGui.ColorEdit4("##0", ref value, ImGuiColorEditFlags.Float | ImGuiColorEditFlags.AlphaPreviewHalf | (_clamped ? 0 : ImGuiColorEditFlags.HDR)) && !disabled)
|
||||
{
|
||||
if (_squaredRgb)
|
||||
value *= new Vector4(value.X, value.Y, value.Z, 1.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue