Browse Source

Fix bloom colour and intensity conversion

MultipleMaids modifies bloom intensity on a scale of 0 to 5.7 while
MeidoPhotoStudio is on a scale of 0 to 100.

Colour is on a scale of 1 to 0.5 and is applied in MM by subtracting
that value from 1.
habeebweeb 4 năm trước cách đây
mục cha
commit
95ff713d64
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      COM3D2.MeidoPhotoStudio.Converter/Program.cs

+ 2 - 2
COM3D2.MeidoPhotoStudio.Converter/Program.cs

@@ -535,10 +535,10 @@ namespace COM3D2.MeidoPhotoStudio.Converter
             {
                 // bloom
                 binaryWriter.Write(Plugin.BloomEffectManager.header);
-                binaryWriter.Write(float.Parse(strArray4[2])); // intensity
+                binaryWriter.Write(float.Parse(strArray4[2]) / 5.7f * 100f); // intensity
                 binaryWriter.Write((int)float.Parse(strArray4[3])); // blur iterations
                 binaryWriter.WriteColour(new Color( // bloom threshold colour
-                    float.Parse(strArray4[4]), float.Parse(strArray4[5]), float.Parse(strArray4[6]), 1f
+                    1f - float.Parse(strArray4[4]), 1f - float.Parse(strArray4[5]), 1f - float.Parse(strArray4[6]), 1f
                 ));
                 binaryWriter.Write(int.Parse(strArray4[7]) == 1); // hdr
                 binaryWriter.Write(int.Parse(strArray4[1]) == 1); // active