Skip to content

Commit

Permalink
fix messed up cloud integration (rainbow colors) in main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
LGhassen committed May 15, 2021
1 parent a93dde5 commit 3b14c36
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 7 additions & 1 deletion scatterer/Effects/Proland/Atmosphere/SkyNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,13 @@ public void InitEVEClouds()
InitPostprocessMaterialUniforms (Scatterer.Instance.eveReflectionHandler.EVEClouds2dDictionary [celestialBodyName] [i].Clouds2dMaterial);

Utils.EnableOrDisableShaderKeywords (Scatterer.Instance.eveReflectionHandler.EVEClouds2dDictionary [celestialBodyName] [i].Clouds2dMaterial, "PRESERVECLOUDCOLORS_ON", "PRESERVECLOUDCOLORS_OFF", EVEIntegration_preserveCloudColors);


if (HighLogic.LoadedScene == GameScenes.MAINMENU)
{
//Wrongly defined to ON in mainmenu by EVE, causing messed up extinction calculations
Utils.EnableOrDisableShaderKeywords (Scatterer.Instance.eveReflectionHandler.EVEClouds2dDictionary [celestialBodyName] [i].Clouds2dMaterial, "WORLD_SPACE_ON", "WORLD_SPACE_OFF", false);
}

}
}
catch (Exception stupid)
Expand Down
6 changes: 2 additions & 4 deletions scatterer/Scatterer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using UnityEngine;
using UnityEngine.Rendering;

[assembly:AssemblyVersion("0.0767")]
[assembly:AssemblyVersion("0.0769")]
namespace scatterer
{
[KSPAddon(KSPAddon.Startup.EveryScene, false)]
Expand Down Expand Up @@ -54,7 +54,7 @@ public class Scatterer: MonoBehaviour
bool coreInitiated = false;
public bool isActive = false;
public bool unifiedCameraMode = false;
public string versionNumber = "0.0767 dev";
public string versionNumber = "0.0769 dev";

public List<GenericAntiAliasing> antiAliasingScripts = new List<GenericAntiAliasing>();

Expand Down Expand Up @@ -99,8 +99,6 @@ void Awake ()

if (HighLogic.LoadedScene == GameScenes.MAINMENU)
{


if (mainSettings.integrateWithEVEClouds)
{
ShaderReplacer.Instance.replaceEVEshaders();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ Shader "Scatterer-EVE/Cloud" {
#pragma multi_compile ECLIPSES_OFF ECLIPSES_ON
#pragma multi_compile RINGSHADOW_OFF RINGSHADOW_ON
#pragma multi_compile PRESERVECLOUDCOLORS_OFF PRESERVECLOUDCOLORS_ON
#pragma multi_compile GODRAYS_OFF GODRAYS_ON
//#pragma multi_compile GODRAYS_OFF GODRAYS_ON
#define GODRAYS_OFF
#endif

#ifndef MAP_TYPE_CUBE2_1
Expand Down

0 comments on commit 3b14c36

Please sign in to comment.