Jump to content

[WIP][1.9.x-1.12.x] Scatterer-atmospheric scattering (0.0838 - 14/08/2022) Scattering improvements, in-game atmo generation and multi-sun support


Recommended Posts


Scatterer is a graphical mod created primarily to add realistic atmospheric scattering to Kerbal Space Program.

The mod was subsequently extended with other graphical effects that add to the game's atmosphere and now covers the following:

  • Atmospheric scattering
  • Ocean shaders (with transparency, sky reflections, foam, refractions and underwater effects)
  • Better sunflare rendering
  • Godrays and terrain shadows
  • Visible eclipse shadows
  • Integration with EVE (clouds mod) to display effects and color changes on clouds





v0.0722: Godrays, underwater light rays and interactible waves:



Detailed post:


v0.052: Anti-aliasing, sunset lighting, ocean shadows and fixed tsunami bug



           In the screenshots, you have stock EVE, latest scatterer, and for the part shaders Textures Unlimited with some moduleManager patches for stock parts (can't remember where I grabbed it but probably this https://spacedock.info/mod/1841/Textures Unlimited Default Stock Config - Unofficial)


Full album https://imgur.com/a/gLhsAT1


v0.0320-320b: water refraction



Full album http://imgur.com/a/xahKF


Older albums:

v0.0300: EVE cloud integration



Full album http://imgur.com/a/dhhFK


Godrays and terrain shadows album: https://imgur.com/a/4LhYC

Older ocean album: http://imgur.com/a/JJDaU

Older album: http://imgur.com/a/hPiEu#0

Old album by BrutalRIP: http://imgur.com/a/gMX93



The videos in this section are a bit old and a few versions behind, anyone feel like making a fresh video? :)




Dev posts:






UI can be toggled with Alt-F11 or Alt-F10

If that doesn't work try shift-alt-F10 or shift-alt-F11 

Documentation (work in progress):




Config tool:


From version 0.0824 you can now generate atmos directly from the in-game UI. Previous versions still need to use the config tool.

Config tool is no longer Directx11 only, there are dedicated builds for mac and linux.

This config tool will allow you to generate new precomputed tables for the atmosphere, basically this is the only way to tweak atmosphere colors.

I haven't updated this in a while but you can ignore the planet name field.

Rg is the planet radius (it says diameter in the tool but it's wrong) Rt is the height of the atmosphere. RL is the limit of the atmosphere but it works weird.

(Keep in mind it is not important what the actual value of Rg, Rt or RL is, what matters are the ratios Rt/Rg and Rl/Rg, Rg is automatically scaled to your chosen planet's radius, Rt and RL are scaled by factors of ChosenPlanetRadius/Rg)

Also, you don't need to change Rg from the original value, just copy everything into KSP and it'll rescale automatically.

Half heights are the height in km that half the particles are found below. If you modify Rt and Rl you have to modify these or you get artifacts.

To use this, just enter your settings and press generate, if you're satisfied with the result, copy the .raw files (ScattererTool_Data\Proland\Textures\Atmo) and  manually open the .xml file (\ScattererTool_Data) from the tool folder and copy the settings into your planet of choice's settings.cfg file in the scatterer folder and replace the files in the scatterer mod folder with them. As of scattererv0.024 (1.1 compatibility update), scatterer now uses .half files, any .raw files will be converted to .half IF NO .half FILE EXISTS. Therefore copy the .raw files like usual and delete any existing .half files, the new .raw files will be converted automatically to .half, you only need to distribute the latter.

Sorry this is a bit messy, I'll try to update this tool soon.

Here's an example of what you can do with the config tool: GGCwDqj.jpg

And the result in KSP:



Some more ingame examples:



How to report Issues (important, please read if you want your issue taken into consideration):


For correctly reporting issues read this and follow the instructions, if you don't follow the instructions, your report will be ignored

Follow the template, if you're too lazy here's the copy-pasted, adapted example:

KSP: 1.3.1 Windows 64bit

Problem: Flickering ocean

Mods installed:

Scatterer 0.0324

EnvironmentalVisualEnhancements 1.2.2-1

Reproduction steps:

With ocean shaders enabled, default scatterer settings: Launch a ship from KSP, look at ocean, ocean flickers (appears and disappears) very quickly.


<link>Output_log.txt (preferably dropbox or pastebin link)

Copy this, fill it in, add your log file and submit it. You can find your log file here: Local Disk\Users\<username>\AppData\LocalLow\Squad\Kerbal Space Program

Preferably include screenshots

Preferably submit your issue on github https://github.com/LGhassen/Scatterer/issues it will ease your life and mine.

(Sorry for the big red text and being a bit pushy, but a lot of people don't follow these instructions and I get overwhelmed :))

Known issues (important, please read before reporting/investigating issues):


- Your game may look more aliased on the newest versions. The game's traditional Anti-Aliasing (multi-sampled anti-aliasing: MSAA) is disabled and replaced with post-processing AA (SMAA) or Temporal AA (TAA). Attempting to re-enable the built-in AA in-game will result in artifacts around objects. This is done for several performance and compatibility reasons (the traditional AA limits the kind of effects we can implement). If you go back a few versions there are (older and worse) versions that offered support for both at a big performance cost.
This post explains why this is done:

- Shadows may look bad on the default quality preset. This is actually how the game's default shadows look, pick a higher scatterer preset for better (and slower) shadows.

- Check other known issues here: https://github.com/LGhassen/Scatterer/issues


- Fix map view icons and UI elements jittering with TAA enabled (especially noticeable at low framerates)
- Fix scaledTextureAdjust feature causing visible seams/artifacts on the planets from orbit
- Fix ocean shader not working at all and forming weird geometric shapes on some mobile AMD GPUs
- Fix sunflare not working on Linux due to a path case issue
- Fix white atmo on slower iGPUs
- Fix some nullrefs and leaking gameEvents (thanks @linuxgurugamer and @gotmachine)
- Fix mod not loading if EVE is present (introduced in 837)

- Fix TAA breaking when using Waterfall and Tufx HDR together

- Fix TAA breaking with atmosphereless bodies and becoming a smearfest
- Fix TAA randomy disabling with TUFX
- Use TAA by default on the default preset and upwards, the lower 2 presets still use SMAA
- Expose TAA settings
- Fix UI window being unclickable/undraggable on lower screen resolutions
- Fix Bruneton tonemapper causing artifacts with bright colors

- Fix even slower GPUs still getting white sky and crashes (also delete your atmosphere cache folder)

- Fix white atmos on slower GPUs (also delete your atmosphere cache folder)

- Restored compatibility with 1.9.x 1.10.x 1.11.x, alongside 1.12.x
- Restored compatibility with systems not supporting 3D textures

- Fix interaction between eclipses and city lights causing white planet surface (mostly noticeable on night side)
- Fix "missing property _MainTex" log spam on gas giants

- Fixed wrong scattering on ships near atmosphere edge (most noticeable as blue tint appearing on ships in orbit)
- Fixed flickering sky in reflections (most noticeable on TU parts)
- Fixed flickering clouds in reflections (most noticeable on TU parts)
- Fixed mirror image on scaled planets with in-game AA set to off
- Fix broken multi-star lighting on scaled planets with eclipses on

- Fixed 1/4 res scattering causing scattering to be insanely bright
- Removed dependency on .half files and config tool, atmospheres are now generated directly in-game and cached in "ScattererAtmosphereCache" folder in GameData. Button in-game for clearing this folder if needed. Removed assetPath param.
- New UI to easily generate and preview atmospheres in-game, with options for easily rescaling and thickening/thinning atmosphere, and an option for a quick preview to generate a lower-quality atmo very quickly. Rescale keeps the same looking by making the atmosphere taller and thinner at the same time to conserve the same look.
- Rt And RL params Removed, atmosphere height is now calculated on the fly from the parameters you enter (scale heights + scattering coeffs)
- ExperimentalAtmoScale param removed, use the rescale button
- GlobalAtmoScale param removed, replaced with scaleAtmosphereStartRadius in atmo generation tab directly
- openglThreshold param removed
- Fixed extinction not scaling correctly with atmosphere scale, improved blending of atmospheres (when atmos are in front of each other)
- Fixed horizon related issues where line-like artifacts and a break in the shading appear around the horizon level. A line can still appear on the horizon on very thick atmos, if that happens, the atmo needs to be made thinner or rescaled (taller atmo with lower scattering params will look the same but avoid the artifacts), disabling multiple scattering can also help.
- Fixed concentric circles/ring artifacts appearing on planets/scattering
- Fixed band on the horizon, previously worked around with viewDirOffset param, viewDirOffset param removed.
- Fix planets with tall atmos being lit on the dark side
- Fix clouds being lit on the dark side
- Added option to use single scattering if needed, or you prefer the look for a given planet. Multiple scattering can diverge and become unnaturally bright and show horizon artifacts on very thick atmos, a solution is to disable multiple scattering and to rescale the atmo to be taller.

- New more natural looking blending mode, more hdr-like blending
- Removed projector mode, incompatible with new blending mode.
- Added uncharted tonemapping mode for the atmosphere, produces more vibrant color tones and better contrast, less haze, added ability to switch tonemappers or disable them if you want to use your own tonemapping (TUFX or other).
- Use the new blending for clouds, preserveCloudColors option is now mostly redundant but it will be kept
- Fix clouds on other planets sometimes getting dimmed when it is night time on your current planet

- Support for light from secondary suns, secondary suns don't cast shadows, eclipses, godrays, cloud shadows, caustics/lightrays but can now light up the atmosphere and clouds
- New "cloudIntegrationUsesScattererSunColors" parameter in planetsList: When set to false, will use the real sun colors for clouds (for main sun and secondary suns), when true will use scatterer's sun colors, defaults to false.
- New "sunsUseIntensityCurves" parameter in planetsList: When set to true, both main sun and secondary suns will use the intensity from the star's intensity curve. Defaults to false for retro-compatibility.
- Make scaledSpace eclipses apply only to the main light, additional lights/suns can light up the eclipsed area
- Fix eclipse shader breaking secondary lights on scaledSpace planets with kopernicus load on demand
- Fix eclipses applying to the dark side
- Handle light extinctions for secondary suns in local space

- Fix SMAA blurring text and other cockpit elements in IVA (most noticeable with ASET and rasterpropmonitor)
- Fix godrays too dark when looking at opposite of sun direction
- Fix secondary lights on clouds being too bright


- Fixed a few issues with stuck images on-screen, in some cases during re-entry or when cheating a craft to another planet
- Fixed screen becoming black when crashing command part
- Fixed oceanFFT nullref spam
- Fixed incompatibility with TUFX ambient occlusion


- Depth buffer mode: Renders scattering effect using the depth buffer instead of re-rendering opaque objects:

    * Enables CPU and GPU performance improvements (anywhere from 17% to 41% higher fps with the stock game and scatterer)
    * Added option to render the scattering in 1/4 resolution and upsample for performance (incompatible will godrays, will auto-disable if godrays are used)
    * Compatibility with Parallax (most noticeably underwater)
    * Compatibility with trees and terrain scatters (they now get correct scattering on them instead of sticking out)
    * Disables MSAA anti-aliasing because it's not compatible with the depth buffer (Added option to use SMAA to compensate, MSAA is still used in tracking station and editor scenes so keep it enabled).
    * Depth buffer mode can be disabled in favor of the old mode if you want to have MSAA (performance and compatiblity improvements won't be available in this case)

- Faster long-distance shadow rendering (no longer need to render an additional depth buffer for shadows farther than 7km)

- Small performance improvements in the ocean + ability to further disable foam and transparency for performance on slower machines

- Performance presets and a preset loader in the KSC menu, to easily adjust quality/performance. It will also tell you your current preset by matching individual settings against presets. Scatterer will now default to "low" preset which is just the basic scattering+ocean feel free to go higher or lower depending on your specs.

- Sunflare editor in the UI, changes made here will be lost on scene changes so copy your config. (Config will also be logged when applied from the UI)

- New sunflare syntax (check wiki for details https://github.com/LGhassen/Scatterer/wiki/SunflaresConfig#syntax-version-2)

    * Support for per-element intensity and scale curves
    * Units for the distance in the curves is the parent body's radius, used to make sunflares easy to port from one star to another with different sizes
    * Support for .dds textures for the flares
    * More readable syntax, scales are supplied normally instead of inverse
    * Older sunflares stay compatible by omitting the syntaxVersion tag or using syntaxVersion=1. New sunflare syntax using syntaxVersion=2 in the sunflare config

- Sunflares are loaded directly from their individual sunflare configs (Scatterer_sunflare nodes), no longer need to have and maintain sunflare list in the planetsList file
-  Better error handling when loading and clearer logging, if loading fails the stock effects will load instead of having the ocean not load. Same when atmo files are missing, display stock effects instead of loading white atmosphere.
- Configs loaded from ModuleManager are detected as such, and no longer as coming from "Laythe.cfg", config saving to disk is disabled when a ModuleManager patch is used
- Possibility to preview different SunColor values directly from the UI for fine-tuning (will not save to file though, you still have to manually edit the planetsList file after)
- De-hardcoded a gravity parameter in the ocean spectrum (previously hardcoded to 9.81 m/s^2), a value of 0 will apply the body's surface gravity. This can impact the waves look and look unnatural to us (as we are used to how waves looks on earth), old ocean configs where the value is missing will default to 9.81 as before.
- Fixed weirdly colored clouds in main menu
- Small reduction in ocean jittering in RSS


- Fix log spam "RenderTexture.Create failed: width & height must be larger than 0" when godrays are enabled but terrain shadows and custom shadow resolutions are disabled
- Fix broken ocean shader on Linux/OpenGL
- Fix forced ship recovery from ocean working on non-homeworld planets
- Renamed scaled space scattering object to "Scatterer scaled atmo" for Tilt Unlocker

New features:

- Added volumetric shadows (godrays). Godrays use shadow information so the quality is directly tied to shadowmap resolution and shadow distance. Godray strength can be tweaked and godrays respect atmosphere density and optical depth. Only compatible with Directx 11 (requires the unified camera setup)
- Added underwater light rays, derived directly from the caustics textures and config. Brightness of underwater light rays can be adjusted. Light rays are volumetric and respect shadows
- Added craft-wave interactions. Ocean waves are now interactible/collidable. Only compatible with Directx 11 as it requires async GPU readback
- Added override for ship recovery velocity when splashed and wave interactions are on (by default 5 m/s vs 0.3 m/s for stock), to allow ship recovery in wavy oceans
- Added overrides for water drag and crash tolerance when wave interactions are on, to make ships and seaplanes experience better (3x less drag and 3x less crash tolerance than stock by default). Seaplanes are workable but require some care and timing, it's still possible to take off with the stock gull from by going in the same direction as the waves


- Fix scattering effect getting cut off in the distance for RSS/Rescale
- Fix bleached/white mountains in the distance when ascending to orbit
- Fix caustics, extinction lighting, long-distance shadows and ocean shadows not working on Kopernicus suns
- EVE clouds have correct scattering and extinction based on their altitude and no longer behave as if at ocean level
- Fix EVE clouds having dark side appearing lit in some cases with EVE integration on
- EVE clouds + Sunlight extinction respect extinction thickness
- Fix some cloud flickering issues with EVE, mostly noticeable with spectra when using EVE integration
- Fix sunflares being offset from their star/planet in some cases (when the body is small)
- Fix reflections disappearing from ships when using cameraTools after 250 meters distance
- Fix ocean secondary lights causting artifacts/squares on the planet from orbit
- Fix sky reflection on the ocean not respecting sky exposure and alpha settings
- Added configurable skyReflectionStrength setting in ocean config (can be changed from UI but need to rebuild ocean to apply)

-Fix occasional black screen when reverting to KSC
-Compatibility with EVE-Redux's volumetric particle fading near camera
-Caustics don't appear on shadows
-Small performance improvement when using ocean shader (CPU usage reduction)
-Ocean builds/loads faster if compute shader support is available, m_variance variable is hidden from user
-Added option to disable dithering from sky and scattering effects

-Support for performance-enhanced EVE version: https://forum.kerbalspaceprogram.com/index.php?/topic/196411-110x-eve-redux-performance-enhanced-eve-build/
-Fix wrong overriding of EVE renderqueues

-Update for 1.10
-Fix stock sky and scatterer sky drawing on each other in 1.10
-Fix z-fighting and scattering rendering twice on stock ocean

-Fix issue with VesselView mod resulting in black ship view screens
-Display effects in main menu for modded planets other than Kerbin

-Fix for 1.9.x (Maintain compatibility with 1.8.x)
-Fix for flickering shadows in Dx11 (stock game bug) (with option to disable it just in case)
-Temporary fix for EVE clouds sinking into planet in 1.9
-Temporary fix for EVE clouds being visible in plumes (thanks @R-T-B)
-Handle long-distance shadows on 1.9 Dx11 with a custom method
-Separate shadow settings for new unified camera mode (1.9 Dx11) and other modes using dual cameras
-Added options to override shadowMap resolution with long-distance shadows (defaults to 8K in unified camera mode, can be lowered along with shadows distance for saving performance)
-Added options to override shadowCascadeSplits with long-distance shadows
-Fix compatibility with stock reflection probes
-Fix planets and scaledSpace scenery being visible through other planetSurfaces in stock reflection probes (stock game bug)
-Fix ocean shadow artifacts
-Fade out ocean shadows correctly
-Fix foam/whitecaps becoming invisible in some situations
-Fix shores having weird scattering (mostly RSS/rescale bug)
-Fix Kopernicus ring shadows broken since Kopernicus refactor (only linear rings supported, tiled rings will not cast shadows)
-Fix issue with some cargo bays (stock drag cubes) causing low framerates and errors
-Added new setting to partially flatten scaledSpace mesh geometry, to be used when "naked" scaledSpace geometry is visible behind localSpace scattering and terrain (Kerbin needs this in 1.9)
-New, more readable options menu layout
-Better logging when initializing Scatterer celestial bodies

-Added water caustics, configurable
-Add possiblity to change sun color for atmospheres (possibility for colored suns, coloring atmospheres differently)
-Fix issue with symlinks in paths
-Fixed issue with oceanRefractions setting not getting saved
-Fixed crash due to atmosphereProjector destructor
-Fixed some issues when starting unity in debug mode

-Update for 1.8
-Disable dithering on sunflares because of pronounced artifacts

-Fix refraction/transparency artifacts in the ocean at altitude (swirly appearance)
-Fix unnaturally bright scattering on the ocean and a small pop while transitioning to orbit
-Fix white sky bug in some situations
-Add trailing zero in version number for CKAN

-Fix z-fighting (flickering black squares on terrain when high in atmosphere)
-Fix overlay/atmosphere visible on ships in orbit

For end users:
-Anti-aliasing on atmosphere effects (fix black edges on horizon, sea and terrain)
-All effects compatible with camera mods (rasterprop etc...)
-Removed godrays to add the previous two points
-Sunlight color is tinted by extinction (objects receive red light at sunset instead of white)
-Fix tsunami/flood bug in KSC scene, and with Kerbal Konstructs
-Fix line break in scattering effect
-Automated and improved transition to orbit with less pops/discontinuities
-Ocean ambient light (ocean visible at night)
-Shadows visible on the ocean (may be buggy in dx11)
-Sunflare visible in supersampled screenshots
-Display scatterer button in KSC menu only
-Improved shadow precision
-Sunflare scales with FOV
-Fix performance high performance hit of dithering in OpenGL on certain machines (thanks @soulsource)
-Don't break stock underwater effect with stock ocean
-Fix buggy ocean surface when lowering ocean resolution
-Fix ocean pixel lights
-Fix various artifacts
-Moved settings that change every time to pluginData

For modders:
-Merged local and scaled settings (scattering+extinction), to reduce clutter
-Removed mapSkyExtinctionRimFade, mapGroundExtinctionFade and _mapExtinctionScatterIntensity 
-Added a new setting extinctionThickness, setting it works on localPostProcessing, scaledSpace and clouds. . It works as (1-extinctionGroundFade),
-Removed other redundant/unused settings
-Fixed extinction tint not doing anything
-Mapnode removed, map mode just uses the highest config node
-Created a repo for stock scatterer config, to track config and syntax changes, you can sue it like this
-Fix not being able to add sky effect to atmosphere-less bodies
-Update to 1.5.1
-Fix stock sunflare appearing on top of custom sunflare
-Fix effects flipped when AA is disabled
-Add mod button to toolbar and remove intrusive mod menu from main menu (new icon by cratercracker)
-Display effects in main menu

-Update EVE shaders (fading rim)

-Fix issues with B9PartSwitch resulting in invisible water and weird sky shading
-Fix some issues with banding in the sky and underwater

-Fix issue where space is black and planets are invisible
-Fix flipped post-processing without AA on direct3D
-Fix gas giants visible through other planets
-Fix refraction and post-processing effects not applying to new mk1-3 pod 

-1.4 Compatibility
-Fix postProcessing effects not applying to trees (atmospheric scattering) or fairings (underwater)
-Fix/Minimize white aliasing around objects when in front of the ocean

-Fix nullref spam with refractions on
-Fix ocean "stuck" in the screen and visible on the moon and other bodies
-Fix black sky in KSC view when reverting mission
-Fix halo issue and remove alternateSQRT option
-Fix atmospheres visible through other planets
-Fix nullref issue on planets without PQS
-Recompiled for 1.3.1

-1.3 compatibility: fixed flying tiles issue

-New water effects: Water refraction, depth-based transparency, contact foam and underwater surface and underwater "fog"
-Fixed "break" in the postprocessing effect very close to the camera
-NearClipPlane parameter is back in the config file per popular request, not recommended to mess with it unless you know what you're doing
-Fix some issues with disappearing layer2d (used for spectra glow effects)
-Changed config file structure to improve ModuleManager compatibility
-Added option to disable planet config auto-saving on scene change
-Per-planet EVE integration
-EVE integration: option to preserve cloud colors, prevents "bleached" clouds when using EVE integration
-Fixed a few EVE integration issues causing clouds to appear black on some configs

-EVE cloud integration, scattering is now applied to clouds and they change colors at sunset (old shading still an option from main menu, useful for EVE 7-4 and visual packs that aren't reconfigured for the new system.
-Added kopernicus ring shadows, rings can now cast shadows on planets (if using the new EVE integration, the shading may not look right, it's better not to have clouds on a planet that has rings ATM, old cloud shading works fine).
-Sunflare changes intensity and color when seen through Kopernicus rings.
-Added sun flare ghost fade-out after a configurable distance.
-Effects now work in tracking station.
-Fixed atmospheres wobbling when observing far away planets in map view, ie planets that the active vessel is not orbiting.
-Fixed ocean reflections and foam being very faint.
-Fixed "experimental viewdir offset" flipping directions sometimes, this should fix the band over the horizon.
-Fixed re-entry effects rendering behind ship.
-Removed nearClip Parameter and fixed "slicing" on objects close to camera.
-Fixed ocean and postprocessing shaders causing artifacts on Texture Replacer's reflections.
-Fixed high ambient light issue on ship when disabling ambient light in scaledSpace.
-Fixed whole screen being tinted with color of sunflare when being very far from sunflare source
-Fixed rectangular artifacts on sunflare ghosts
-Sunflare now shows correct extinction from all distances, previously all extinction effects disappeared when the PQS is disabled.
-Planets now have an individual "mainSunCelestialBody" setting. Useful for multi-star system mods.
-Fixed OpenGL on windows

-Recompiled for 1.2, fixes map errors spam
-Added potential fix for atmosphere halo (if it doesn't work, try switching it off)
-Switched sky shaders to soft blending, objects seen through atmo and planets from orbit might look a little different, let me now if old one is better

***********v0.0255*********** Released for 1.2 and 1.1.3
-ModuleManager compatibility
-Fixed several issues with EVE cloud shadow issues for 1.2
-Fixed overbright atmosphere edge in map/orbit view in 1.2

-Compatibility fixes for linux and mac
-Possibility to set name the main celestial body considered as the sun (useful for kopernicus)

-1.2 Compatibility
-Fixed ocean spazzing out when zooming out or rotating camera
-Multiple lens flares support

-Fixed lens flare compatbility with 1.1.3
-Godrays no longer cause black trails behind ships/buildings
-Fixed weird halos around planet

-Fixed terrain shadow artifacts (adjust shadow bias and shadow normal bias if you still get issues)
-Fixed 3rd sun flare ghost displaying image of 2nd ghost

-Fixed ocean FOV and IVA-related issues
-Fixed compatibility with Directx11
-Fixed lens flare in OpenGL
-Fixed weird looking eclipses on Jool
-Doubled number of sun flare ghost instance slots and added a ghost texture slot
-Sun flare now fades out when zooming in on the sun so the sun surface is visible

-Added accurate sky reflections on the ocean
-Added option to enable light sources to work with the ocean (big performance hit at the moment)
-Mostly fixed horizon line artifacts
-Ocean now appears in supersampled screenshots
-Issue where ocean flickers and bobs around with camera movements appears to be fixed
-Moved fourierGridSize option to the main menu (option with the biggest effect on ocean performance)

-Added a way to override rendertype tags (fixes rectangles in the sky when using EVE clouds or from rocket exhausts)
-Updated the "render on top of eve clouds" option to match EVE's new renderqueue (gets rid of weird terminators with EVE)
-Tweaked and recompiled shaders for unity 5 (should get rid of some rendering issues new to unity 5)
-Terrain shadows are now disabled by default to avoid heavy artifacting in dx9

-Fixed weird and greenish coloration in postProcessing shader and sky shader especially visible near the horizon, both effects are back to being realistically blue.
-Fixed eclipses nor working correctly in map view when viewing planets other than the active one.

-1.1 Compatibility
-Much faster, nearly instantaneous loading, reverting a flight you no longer have to wait 10 seconds, effects enabled in map view for planets other than the active one and will load on demand.
-.raw format replaced by .half format, which enable faster laoding and smaller filesize, if you created your own .raw files using the config tool, delete the .half files and any .raw files will be converted automatically to .half the first time the planet is loaded. YOU ONLY NEED TO DISTRIBUTE THE .half FILE.
-Option to disable scaledSpace ambient light (celestial bodies appear realistically lit and will display as crescents in the sky)
-Restored the sun corona.
-Option to ignore renderType tags, keep this on for the time being as rendertype tags seem to be gone in 1.1 and the postprocessing shader won't work without them.
-No longer need to reload the tables when switching fullscreen/windowed, only ocean needs to be reloaded.
-Added an ocean offset reset when it gets bigger than 20000, avoids floating point precision issues resulting in artifacts or a blocky-looking ocean when traveling a large distance over the ocean such as doing a sub-orbital hop or doing a fast re-entry.
-Window positions are persistent.
-Gui keys are rebindable through the config file.

-Quick fix to effects disappearing in scaledSpace for RSS
-Ocean fourierGridSize restored to 128 as default for Kerbin

-Fixed compatibility with planetary rings
-Fixed lens flare not occluding correctly on bodies without atmosphere
-New option to draw the atmosphere over EVE clouds: Fixes strange-looking terminators when using both EVE and scatterer and looks smoother in general, however it makes the transition from PQS to scaledSpace more problematic and introduces some new issues. Can be toggled of from the main menu or for individual planets throught the planetsList.cfg file.
-Fixed draw order issue where clouds on Jool render over Laythe's sky.
-Partially fixed compatibility with telescope mods: Will work correctly in high orbits (>160 km) with the planet rendering correctly and no overlaying layers, however will get some interference from the postprocessing shader when PQS is active (below 160km for Kerbin).
-Visor reflections (TextureReplacer's reflection plugin) should also be fixed, with the same limitations as the telescope mods.

-Huge memory usage improvements (100-400 mb savings)

-Fixed lens flare shader not working on linux/OpenGL
-Fixed pink square that appears near the player's craft
-Fixed extinction tint not working in sky shader and postprocessing shader in OpenGL

-Fixed completely blue screen issue when loading a craft in high orbit
-Fixed blue screen and tilted camera issue when entering KSC

-Ocean no longer disappears when you rotate the camera, do flips in IVA or get to orbit.
-FakeOcean removed, regular ocean stays all the way to high orbit.
-Added ocean alpha setting to configPoints to fade out the ocean nearing orbit.
-Better way to disable the stock oceans (thx to rbray89), gives a small performance bump.
-Added godrays: Early WIP, disabled by default, these work best with good terrain so turn up your terrain quality. Looks best with terrain shadows.
-Added terrain shadows: These depend on the unity shadows, if you see shimmering or artifacts turn up your shadow quality through the "render quality level" slider in KSP. The default shadow Cascades setting of 4 seems to work quite well. Shadows distance has also been changed from 5 000 to 100 000, this is adjustable in the scatterer config file.
-Added custom sunflare shader: WIP, configurable through custom textures and config file.
-Added eclipses: WIP, appear only on sky and orbit only for now, no terrain shadows. You can set eclipse casters through the planetsList file.
-Tweaked configs for a bunch of planet, ground to orbit transition is much better on Kerbin especially. Didn't have time to redo Duna so it probably loooks really bad.
-Fixed custom depth buffer artifacts (threshold of 10 is enough for all altitudes now).
-Moved all render modes to the custom depth buffer.
-MapViewScale setting no longer required.
-PostProcessing now has extinction like the sky shader.
-PostProcessing blending mode changed from alpha blending to soft additive, basically it blends better and feelsless foggy during the day and more foggy at sunsets/sunrises.
-Sky extinction is now handled via analytic formula, this fixes the bug where sometimes extinction doesn't work with custom configs, beware that objects in the sky are still handled via the old method so this may not fix it. It also looks a bit different so you might have to redo your configs.

-Fixed black ocean bug
-Fixed issue with gas giants giving abysmal fps
-Fixed rim exposure settings resulting in pixelated planet edges
-Fixed atmosphere drawing over planets in map view
-Fixed sunsets/sunrises looking like eclipses
-Sunglare hiding during eclipses
-Cleaner depth buffer and postprocessing in dx11 and opengl (edgeThreshold now obsolete)
-Main menu window for enabling and disabling features

-Minimized z-fighting on the fake ocean
-In addition to their alpha and depth settings, the postprocessing and fake ocean both fade out automatically following how much the PQS is faded out.

-Added ocean faking in postprocessing, prevents rendering the expensive ocean when far away and used in orbital view instead of showing the ocean floor.
-Added variables to fade out the foam and the ocean alpha with distance (seafloor no longer visible in the horizon, "foam wall" removed)
-Added variables to control the exposure and extinction for the edges of the atmosphere separately (also fixes the atmosphere "barrier" effect)
-Fixed sunglare visible through planet and in space

-Fixed the "halo around planets" bug in dx9
-Fixed engine effects displaying on top of ocean when they are behind it

-Fixed issue were reverting flight causes effects to disappear
-Added control/scaling of atmosphere height directly ingame
-Tweaked config for Kerbin: 2x higher atmo, blue sky is visible higher
-1.7x atmosphere height on Laythe
-2.5x atmosphere height on Eve

-Ocean shaders, first public release

-Fixed RSS compatibility, Any Kopernicus / RSS planetary system configuration should be auto compatible now regardless of celestial body and/or transform names and fixed a bunch of bugs, Shaders, configuration and textures are now located dynamically either by celestialBodyName or transformName defined in PlanetList.cfg (thanks to direwolf/tarsolya)

-Added workarounds for most opengl/dx11 artifacts (24bit depth buffer can be turned on/off in planetslist.cfg, openglThreshold and edgethreshold need to be configured with config points)
-Fixed mie scattering in the post processing shader
-Tweaked configs for Jool (now green), Eve and Laythe
-Added sunglare scaling

***********Changelog for 0.019[/B]:
-Multiplanet support
-Fixed nullrefs at start

***********Changelog for 0.01781[/B]:
-Window starts hidden.

***********Changelog for 0.0178[/B]:
-Added compatibility with RSS, to use with RSS replace config file with the one in "RSS compatibility folder" or go into the config file planetName and change the celestialBody to Earth but keep the other name to Kerbin.
-New orbit shader, tweakable through the parameters sky extinction and sky extinction tint.

***********Changelog for 0.0175[/B]:
OpenGL fixes:
-Lines in the sky bug fixed permanently (without needing forceOff aniso)
-Rainbow coloring/discoloration fixed
-Moire patterns fixed (also fixed in dx11)
A little better OpenGL performance

***********Changelog for 0.0171[/B]:
-Dx11 compatibility fix

***********Changelog for 0.017[/B]:

-Full compatibility with EVE clouds
-New orbital effect/view (EVE clouds recommended)
-Celestial objects now visible in the sky
-Added config points as a way to set different settings for different altitudes and smooth out between them
-New UI for config points
-More discrete default settings, less foggy
-New, smoother depth setting function (scattering effects no longer seem to start at a visible barrier)
-Fixed blending issues (Black bars at the edge of the atmosphere, barrier effect when going up etc...)
-Fixed z-fighting issues and weird stuff at orbits beyond 200km
-Fixed atmosphere displaying over moon and other celestial objects randomly
-Fixed effect in map view
-Map view now has separate settings which only trigger in map view.
-Fixed ForceOFF aniso setting not persisting/loading right

***********Changelog for 0.0151[/B]:

Just a quick fix for the pink objects bug

***********Changelog for 0.015[/B]:

-Lowered memory usage (I expect your feedback on this)
-Added persistent settings
Settings can be saved with the save settings button or they get saved automtically when the scene is changed.
-EVE clouds are now visible in the sky (postprocessing still draws over them though)
-Added toggle aniso button for people who are still getting the lines in the sky when using OpenGL (if you don't have the bug don't use this, if this still doesn't fix the bug try disabling aniso if you have it forced from the drivers)
-Terrain should no longer be low-res
-Fixed some minor bugs

***********Changelog for 0.014 Experimental version[/B]:

-Effects no longer lag behind as you move the camera.
-Auto depth adjustment based on height (WIP/experimental).
-Kerbin no longer covered by blue sphere after altitude of 160 Km.
-New view from orbit faded out progressively as you approach scaled space (extremely WIP/experimental, has some artifacts)
-Few adjustments to the base settings, more subtle effect.
-UI now defaults to hidden, can be enabled with Alt-f11 or Alt-f10.
-The mod no longer disables anisotropic filtering and forcing aniso through drivers no longer causes artifacts
-Other minor fixes


I do this in my spare time, if you like what I do you can support me here:





Download link:


Alternate: https://github.com/LGhassen/Scatterer/releases

Config Tool links (for pre-0.0824 versions):

Windows: https://raw.githubusercontent.com/LGhassen/Scatterer/c17fe61a316d8e0e03b769ebc64741e1755ab2c4/configTool.zip

Linux: https://github.com/LGhassen/Scatterer/releases/download/0.1-mac-conftool/ConfigToolLinux.zip

Mac: https://github.com/LGhassen/Scatterer/releases/download/0.1-mac-conftool/MacConfTool.app.zip




GPLv3 plugin.

CC BY-NC-ND 4.0 shaders and configs.

Fanart corner:

fanart by @cratercracker


fanart by @01010101lzy




Edited by blackrack
Link to comment
Share on other sites

There are some atmospheric scattering effects in EVE (you can see them in Astronomer's pack), but this one looks promising because EVE will be dead in 1.0 most likely, as RBray is no longer interested in updating it it seems.

Link to comment
Share on other sites

There are some atmospheric scattering effects in EVE (you can see them in Astronomer's pack), but this one looks promising because EVE will be dead in 1.0 most likely, as RBray is no longer interested in updating it it seems.

*cough*unless Squad hired Rbray to stockify EVE for 1.0*cough*

Oh my.. sorry. Allergies. Tis the season.

Seriously though this is awesome. I hope the two can one day be combined.

Link to comment
Share on other sites

I found a temporary fix for the line artifacts, simply bump the visual settings down to "fast", this doesn't seem to affect KSP's visuals much but it disables shadows.

Seriously though this is awesome. I hope the two can one day be combined.

I don't see a reason why this wouldn't happen, I've already seen someone combining this with clouds.

Edited by blackrack
Link to comment
Share on other sites

Which components of the Atmosphere do you want to deactivate exactly? With this little function I threw together, you can deactivate the mesh-renderer for the atmosphere, but that results in a black "atmosphere" in the PQS-view.

public void DeactivateAtmosphere(string name)
Transform t = ScaledSpace.Instance.transform.FindChild(name);
for (int i = 0; i < t.childCount; i++)
if (t.GetChild(i).gameObject.layer == 9)
// Deactivate the Athmosphere-renderer

// Reset the shader parameters
Material sharedMaterial = t.renderer.sharedMaterial;
sharedMaterial.SetTexture(Shader.PropertyToID("_rimColorRamp"), null);
sharedMaterial.SetFloat(Shader.PropertyToID("_rimBlend"), 0);
sharedMaterial.SetFloat(Shader.PropertyToID("_rimPower"), 0);

// Stop our script
i = t.childCount + 10;

If you just want to modify the color of the rim (horizon), you have to manipulate the CelestialBody component. If you have questions, PM me :)

Thanks a lot, I'll try this code and experiment with it later today.

Right now my atmosphere renders as pitch black during the night, I can make it transparent below a certain threshold in order to be able to see the stars and the moon at night but the stock atmosphere effects end up messing with it during sunrise/sunset. I didn't know the stock atmosphere had components but I'll probably disable them all.

Anyway, if you're familiar with meshes, if I use a meshrenderer for my atmosphere I have a huge performance drop, everything starts running at 5 fps. What's the deal with this? I'm currently rendering my atmosphere with graphics.drawmesh to get around this. Also, there are the line artifacts described in the OP which go away when i drop the visual settings of the game to fast.

Link to comment
Share on other sites

I had posted about this in the texture replacer mod thread once, but it didn't seem like it would be possible via that mod.

I'm looking for a mod that can make less of the skybox visible while on the surface of a body with atmosphere and you are on the night side. My original idea was to use texture replacer to add a second skybox behind the first. The first one would contain gas clouds, nebulas, galaxies and other phenomenon that are not normally visible from within atmosphere. That layer would have it's alpha level dropped as you plunge into atmosphere, and vice versa. It should never reach 100% either, so that you can always see the same stars behind/through it.

Seems that my idea would require a plugin of it's own, which I have no idea how to write. Perhaps this is a feature you may want to explore.

Link to comment
Share on other sites

blackrack, could you please upload your preview version to another hoster? I can't reach MEGA for whatever reason.. :(

Here you go, I trimmed off the fat so this version should have better performance than the first.


I had posted about this in the texture replacer mod thread once, but it didn't seem like it would be possible via that mod.

I'm looking for a mod that can make less of the skybox visible while on the surface of a body with atmosphere and you are on the night side. My original idea was to use texture replacer to add a second skybox behind the first. The first one would contain gas clouds, nebulas, galaxies and other phenomenon that are not normally visible from within atmosphere. That layer would have it's alpha level dropped as you plunge into atmosphere, and vice versa. It should never reach 100% either, so that you can always see the same stars behind/through it.

Seems that my idea would require a plugin of it's own, which I have no idea how to write. Perhaps this is a feature you may want to explore.

I guess this is feasible, though I'm not personally interested in it I guess I could make it an optional feature or a separate mod once I'm done polishing up this one.

Im not really familiar with the meshes, but with the structure of the atmospheric components. :)

For the black pitch during night: Did you replaced the material with a material from scratch? If yes, renderQueue could be the problem. (Sorry, can't look at the source atm)

I just rendered a completely new mesh with it's own shader and material that occldue the old sky but didn't set any alpha transparency. I did this now but sill have to remove/tweak the old atmosphere and my messed up dx9 shader.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...