mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 20:54:16 +01:00
Material editor: improve color accuracy
This commit is contained in:
parent
3530e139d1
commit
ccca2f1434
1 changed files with 4 additions and 3 deletions
|
|
@ -412,12 +412,13 @@ public partial class ModEditWindow
|
||||||
private static bool ColorPicker( string label, string tooltip, Vector3 input, Action< Vector3 > setter, string letter = "" )
|
private static bool ColorPicker( string label, string tooltip, Vector3 input, Action< Vector3 > setter, string letter = "" )
|
||||||
{
|
{
|
||||||
var ret = false;
|
var ret = false;
|
||||||
var tmp = input;
|
var inputSqrt = Vector3.SquareRoot( input );
|
||||||
|
var tmp = inputSqrt;
|
||||||
if( ImGui.ColorEdit3( label, ref tmp,
|
if( ImGui.ColorEdit3( label, ref tmp,
|
||||||
ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.DisplayRGB | ImGuiColorEditFlags.InputRGB | ImGuiColorEditFlags.NoTooltip )
|
ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.DisplayRGB | ImGuiColorEditFlags.InputRGB | ImGuiColorEditFlags.NoTooltip )
|
||||||
&& tmp != input )
|
&& tmp != inputSqrt )
|
||||||
{
|
{
|
||||||
setter( tmp );
|
setter( tmp * tmp );
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue