Merge pull request #1205 from CalamityTeam/tileblend-config
TileBlendMerge - Added Quality Config
This commit is contained in:
5 files changed
+50
-2
No files matched your search
@@ -1,6 +1,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.UI;
|
||||
using CalamityMod.UI.DraedonsArsenal;
|
||||
using CalamityMod.UI.Rippers;
|
||||
@@ -82,6 +83,10 @@ namespace CalamityMod
|
||||
[Range(0.0f, 1.0f)]
|
||||
public float EnergyShieldOpacity { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(TileBlendingQuality.Normal)]
|
||||
public TileBlendingQuality TileTextureBlendingQuality { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region UI Changes
|
||||
|
||||
@@ -368,6 +368,15 @@ CalamityClientConfig: {
|
||||
'''
|
||||
}
|
||||
|
||||
TileTextureBlendingQuality: {
|
||||
Label: "[i:GlowPaint] Tile Blending Quality"
|
||||
Tooltip:
|
||||
'''
|
||||
Change quality of tile merge soft-blending renderer.
|
||||
This controls the quality of soft-blending between different types of merged tile.
|
||||
'''
|
||||
}
|
||||
|
||||
VanillaCooldownDisplay: {
|
||||
Label: "[i:HealingPotion] Display Vanilla Cooldowns"
|
||||
Tooltip:
|
||||
@@ -596,3 +605,26 @@ SetBonusDoubleTapOptions: {
|
||||
Tooltip: Always disables double-tap. Can be used to completely disable set bonus activation.
|
||||
}
|
||||
}
|
||||
|
||||
TileBlendingQuality: {
|
||||
Tooltip: ""
|
||||
|
||||
Disable: {
|
||||
Label: Disable
|
||||
Tooltip: "Disable Tile Texture Soft Blending"
|
||||
}
|
||||
|
||||
Normal: {
|
||||
Label: Normal
|
||||
Tooltip: "Enable Tile Texture Soft Blending"
|
||||
}
|
||||
|
||||
High: {
|
||||
Label: High
|
||||
Tooltip:
|
||||
'''
|
||||
Enable Tile Texture Soft Blending.
|
||||
[c/F05A5A:Allows Sliced Rendering. Not recommended for low-end devices.]
|
||||
'''
|
||||
}
|
||||
}
|
||||
@@ -152,4 +152,11 @@ namespace CalamityMod.Systems
|
||||
public ushort SheetIndex = sheetIdx;
|
||||
public byte BlendData = blendData;
|
||||
}
|
||||
|
||||
public enum TileBlendingQuality
|
||||
{
|
||||
Disable,
|
||||
Normal,
|
||||
High
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Systems
|
||||
{
|
||||
orig(self, solidLayer, forRenderTargets, intoRenderTargets, waterStyleOverride);
|
||||
|
||||
if (!solidLayer)
|
||||
if (!solidLayer || CalamityClientConfig.Instance.TileTextureBlendingQuality == TileBlendingQuality.Disable)
|
||||
return;
|
||||
|
||||
var screenPosition = Main.Camera.UnscaledPosition;
|
||||
@@ -84,7 +84,8 @@ namespace CalamityMod.Systems
|
||||
Color[] colorSliceBuffer = ColorSliceBuffer.Value;
|
||||
|
||||
// Is HalfBlock condition is also in vanilla, so we follow that
|
||||
if (Lighting.NotRetro && !tile.IsHalfBlock && !TileID.Sets.DontDrawTileSliced[tileType])
|
||||
var silcedConfigEnabled = CalamityClientConfig.Instance.TileTextureBlendingQuality == TileBlendingQuality.High;
|
||||
if (silcedConfigEnabled && Lighting.NotRetro && !tile.IsHalfBlock && !TileID.Sets.DontDrawTileSliced[tileType])
|
||||
{
|
||||
var tileRenderer = Main.instance.TilesRenderer;
|
||||
if (tileLight.IsAnyChannelGreaterThan(tileRenderer._highQualityLightingRequirement))
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace CalamityMod.Systems
|
||||
|
||||
public override void PostDraw(int i, int j, int type, SpriteBatch spriteBatch)
|
||||
{
|
||||
if (CalamityClientConfig.Instance.TileTextureBlendingQuality == TileBlendingQuality.Disable)
|
||||
return;
|
||||
|
||||
if (CalamityTileSets.DrawBlendMergeAfterSolidTile[type])
|
||||
return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user