Skip to content

Commit

Permalink
fixing texture loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodrigv committed Apr 27, 2020
1 parent 9ae6685 commit e0af96b
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################

/.vs
/_ReSharper.Caches/ReSharperPlatformVs16193_4011600b.00
Binary file modified GameData/TUFX/Plugins/TUFX.dll
Binary file not shown.
Binary file modified GameData/TUFX/Plugins/TUFX.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Plugin/TUFX/GUI/ConfigurationGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ private void renderColorGradingSettings()
}
else if (cg.gradingMode == GradingMode.LowDefinitionRange)
{
AddTextureParameter("LDR LUT", cg.ldrLut, BuiltinEffect.ColorGrading.ToString(), "ldrLut");
AddTextureParameter("LDR LUT", cg.ldrLut, BuiltinEffect.ColorGrading.ToString(), "LdrLut");
AddFloatParameter("LDR LUT Contrib.", cg.ldrLutContribution, 0, 1);
}
else if (cg.gradingMode == GradingMode.HighDefinitionRange)
Expand Down
8 changes: 4 additions & 4 deletions Plugin/TUFX/PostProcessing/Effects/ColorGrading.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ public override void Load(ConfigNode config)
loadFloatParameter(config, "ToneCurveShoulderLength", toneCurveShoulderLength);
loadFloatParameter(config, "ToneCurveShoulderAngle", toneCurveShoulderAngle);
loadFloatParameter(config, "ToneCurveGamma", toneCurveGamma);
loadTextureParameter(config, "LDRLut", ldrLut);
loadFloatParameter(config, "LDRLutContribution", ldrLutContribution);
loadTextureParameter(config, "LdrLut", ldrLut);
loadFloatParameter(config, "LdrLutContribution", ldrLutContribution);
loadFloatParameter(config, "Temperature", temperature);
loadFloatParameter(config, "Tint", tint);
loadColorParameter(config, "ColorFilter", colorFilter);
Expand Down Expand Up @@ -439,8 +439,8 @@ public override void Save(ConfigNode config)
saveFloatParameter(config, "ToneCurveShoulderLength", toneCurveShoulderLength);
saveFloatParameter(config, "ToneCurveShoulderAngle", toneCurveShoulderAngle);
saveFloatParameter(config, "ToneCurveGamma", toneCurveGamma);
saveTextureParameter(config, "LDRLut", ldrLut);
saveFloatParameter(config, "LDRLutContribution", ldrLutContribution);
saveTextureParameter(config, "LdrLut", ldrLut);
saveFloatParameter(config, "LdrLutContribution", ldrLutContribution);
saveFloatParameter(config, "Temperature", temperature);
saveFloatParameter(config, "Tint", tint);
saveColorParameter(config, "ColorFilter", colorFilter);
Expand Down
16 changes: 5 additions & 11 deletions Plugin/TUFX/PostProcessing/PostProcessEffectSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,12 @@ internal void loadTextureParameter(ConfigNode node, string name, ParameterOverri
{
return;
}
string texName = node.GetValue(name);
string texName = node.GetStringValue(name);

Texture2D texture = null;
if (texName.StartsWith("BUILTIN:"))
{
texName = texName.Substring(8);
texture = TexturesUnlimitedFXLoader.INSTANCE.getTexture(texName);
}
else
{
texName = texName.Substring(7);
texture = GameDatabase.Instance.GetTexture(texName, false);
}

texture = GameDatabase.Instance.GetTexture(texName, false);

if (texture != null)
{
param.Override(texture);
Expand Down
12 changes: 6 additions & 6 deletions Plugin/TUFX/TUFX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>libs\Assembly-CSharp.dll</HintPath>
<HintPath>G:\GAMES\KERBAL\Kerbal Space Program_191_RSS\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -43,19 +43,19 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.AnimationModule">
<HintPath>libs\UnityEngine.AnimationModule.dll</HintPath>
<HintPath>G:\GAMES\KERBAL\Kerbal Space Program_191_RSS\KSP_x64_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>libs\UnityEngine.AssetBundleModule.dll</HintPath>
<HintPath>G:\GAMES\KERBAL\Kerbal Space Program_191_RSS\KSP_x64_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>libs\UnityEngine.CoreModule.dll</HintPath>
<HintPath>G:\GAMES\KERBAL\Kerbal Space Program_191_RSS\KSP_x64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>libs\UnityEngine.IMGUIModule.dll</HintPath>
<HintPath>G:\GAMES\KERBAL\Kerbal Space Program_191_RSS\KSP_x64_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>libs\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>G:\GAMES\KERBAL\Kerbal Space Program_191_RSS\KSP_x64_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit e0af96b

Please sign in to comment.