@geoblocks/cesium-post-process 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/analog-video.d.ts +71 -0
- package/dist/analog-video.d.ts.map +1 -0
- package/dist/analog-video.js +128 -0
- package/dist/analog-video.js.map +1 -0
- package/dist/blur.d.ts +13 -0
- package/dist/blur.d.ts.map +1 -0
- package/dist/blur.js +36 -0
- package/dist/blur.js.map +1 -0
- package/dist/cesium-post-process.d.ts +30 -0
- package/dist/cesium-post-process.d.ts.map +1 -0
- package/dist/cesium-post-process.js +31 -0
- package/dist/cesium-post-process.js.map +1 -0
- package/dist/cloud-cover.d.ts +28 -0
- package/dist/cloud-cover.d.ts.map +1 -0
- package/dist/cloud-cover.js +45 -0
- package/dist/cloud-cover.js.map +1 -0
- package/dist/cloud-map.d.ts +7 -0
- package/dist/cloud-map.d.ts.map +1 -0
- package/dist/cloud-map.js +118 -0
- package/dist/cloud-map.js.map +1 -0
- package/dist/cloud-noise.d.ts +13 -0
- package/dist/cloud-noise.d.ts.map +1 -0
- package/dist/cloud-noise.js +222 -0
- package/dist/cloud-noise.js.map +1 -0
- package/dist/clouds.d.ts +275 -0
- package/dist/clouds.d.ts.map +1 -0
- package/dist/clouds.js +642 -0
- package/dist/clouds.js.map +1 -0
- package/dist/color-isolation.d.ts +38 -0
- package/dist/color-isolation.d.ts.map +1 -0
- package/dist/color-isolation.js +61 -0
- package/dist/color-isolation.js.map +1 -0
- package/dist/depth-test.d.ts +9 -0
- package/dist/depth-test.d.ts.map +1 -0
- package/dist/depth-test.js +35 -0
- package/dist/depth-test.js.map +1 -0
- package/dist/digital-video.d.ts +47 -0
- package/dist/digital-video.d.ts.map +1 -0
- package/dist/digital-video.js +102 -0
- package/dist/digital-video.js.map +1 -0
- package/dist/drone-display.d.ts +70 -0
- package/dist/drone-display.d.ts.map +1 -0
- package/dist/drone-display.js +158 -0
- package/dist/drone-display.js.map +1 -0
- package/dist/dufour.d.ts +108 -0
- package/dist/dufour.d.ts.map +1 -0
- package/dist/dufour.js +201 -0
- package/dist/dufour.js.map +1 -0
- package/dist/effect.d.ts +33 -0
- package/dist/effect.d.ts.map +1 -0
- package/dist/effect.js +60 -0
- package/dist/effect.js.map +1 -0
- package/dist/focus.d.ts +11 -0
- package/dist/focus.d.ts.map +1 -0
- package/dist/focus.js +23 -0
- package/dist/focus.js.map +1 -0
- package/dist/frame-clock.d.ts +11 -0
- package/dist/frame-clock.d.ts.map +1 -0
- package/dist/frame-clock.js +57 -0
- package/dist/frame-clock.js.map +1 -0
- package/dist/height.d.ts +12 -0
- package/dist/height.d.ts.map +1 -0
- package/dist/height.js +22 -0
- package/dist/height.js.map +1 -0
- package/dist/infrared.d.ts +23 -0
- package/dist/infrared.d.ts.map +1 -0
- package/dist/infrared.js +36 -0
- package/dist/infrared.js.map +1 -0
- package/dist/jello.d.ts +52 -0
- package/dist/jello.d.ts.map +1 -0
- package/dist/jello.js +136 -0
- package/dist/jello.js.map +1 -0
- package/dist/lens-distortion.d.ts +33 -0
- package/dist/lens-distortion.d.ts.map +1 -0
- package/dist/lens-distortion.js +61 -0
- package/dist/lens-distortion.js.map +1 -0
- package/dist/lightning.d.ts +124 -0
- package/dist/lightning.d.ts.map +1 -0
- package/dist/lightning.js +301 -0
- package/dist/lightning.js.map +1 -0
- package/dist/local-frame.d.ts +38 -0
- package/dist/local-frame.d.ts.map +1 -0
- package/dist/local-frame.js +52 -0
- package/dist/local-frame.js.map +1 -0
- package/dist/motion-blur.d.ts +50 -0
- package/dist/motion-blur.d.ts.map +1 -0
- package/dist/motion-blur.js +108 -0
- package/dist/motion-blur.js.map +1 -0
- package/dist/precipitation.d.ts +146 -0
- package/dist/precipitation.d.ts.map +1 -0
- package/dist/precipitation.js +454 -0
- package/dist/precipitation.js.map +1 -0
- package/dist/rain-rings.d.ts +100 -0
- package/dist/rain-rings.d.ts.map +1 -0
- package/dist/rain-rings.js +181 -0
- package/dist/rain-rings.js.map +1 -0
- package/dist/shaders/Alpenglow.d.ts +3 -0
- package/dist/shaders/Alpenglow.d.ts.map +1 -0
- package/dist/shaders/Alpenglow.js +3 -0
- package/dist/shaders/Alpenglow.js.map +1 -0
- package/dist/shaders/AnalogVideo.d.ts +3 -0
- package/dist/shaders/AnalogVideo.d.ts.map +1 -0
- package/dist/shaders/AnalogVideo.js +3 -0
- package/dist/shaders/AnalogVideo.js.map +1 -0
- package/dist/shaders/Beam.d.ts +3 -0
- package/dist/shaders/Beam.d.ts.map +1 -0
- package/dist/shaders/Beam.js +3 -0
- package/dist/shaders/Beam.js.map +1 -0
- package/dist/shaders/CloudsBlur.d.ts +3 -0
- package/dist/shaders/CloudsBlur.d.ts.map +1 -0
- package/dist/shaders/CloudsBlur.js +3 -0
- package/dist/shaders/CloudsBlur.js.map +1 -0
- package/dist/shaders/CloudsComposite.d.ts +3 -0
- package/dist/shaders/CloudsComposite.d.ts.map +1 -0
- package/dist/shaders/CloudsComposite.js +3 -0
- package/dist/shaders/CloudsComposite.js.map +1 -0
- package/dist/shaders/CloudsDensity.d.ts +3 -0
- package/dist/shaders/CloudsDensity.d.ts.map +1 -0
- package/dist/shaders/CloudsDensity.js +3 -0
- package/dist/shaders/CloudsDensity.js.map +1 -0
- package/dist/shaders/CloudsDepth.d.ts +3 -0
- package/dist/shaders/CloudsDepth.d.ts.map +1 -0
- package/dist/shaders/CloudsDepth.js +3 -0
- package/dist/shaders/CloudsDepth.js.map +1 -0
- package/dist/shaders/CloudsMarch.d.ts +3 -0
- package/dist/shaders/CloudsMarch.d.ts.map +1 -0
- package/dist/shaders/CloudsMarch.js +3 -0
- package/dist/shaders/CloudsMarch.js.map +1 -0
- package/dist/shaders/CloudsResolve.d.ts +3 -0
- package/dist/shaders/CloudsResolve.d.ts.map +1 -0
- package/dist/shaders/CloudsResolve.js +3 -0
- package/dist/shaders/CloudsResolve.js.map +1 -0
- package/dist/shaders/CloudsShadow.d.ts +3 -0
- package/dist/shaders/CloudsShadow.d.ts.map +1 -0
- package/dist/shaders/CloudsShadow.js +3 -0
- package/dist/shaders/CloudsShadow.js.map +1 -0
- package/dist/shaders/CloudsShadowMap.d.ts +3 -0
- package/dist/shaders/CloudsShadowMap.d.ts.map +1 -0
- package/dist/shaders/CloudsShadowMap.js +3 -0
- package/dist/shaders/CloudsShadowMap.js.map +1 -0
- package/dist/shaders/CloudsSlab.d.ts +3 -0
- package/dist/shaders/CloudsSlab.d.ts.map +1 -0
- package/dist/shaders/CloudsSlab.js +3 -0
- package/dist/shaders/CloudsSlab.js.map +1 -0
- package/dist/shaders/ColorIsolation.d.ts +3 -0
- package/dist/shaders/ColorIsolation.d.ts.map +1 -0
- package/dist/shaders/ColorIsolation.js +3 -0
- package/dist/shaders/ColorIsolation.js.map +1 -0
- package/dist/shaders/DepthEdges.d.ts +3 -0
- package/dist/shaders/DepthEdges.d.ts.map +1 -0
- package/dist/shaders/DepthEdges.js +3 -0
- package/dist/shaders/DepthEdges.js.map +1 -0
- package/dist/shaders/DigitalVideo.d.ts +3 -0
- package/dist/shaders/DigitalVideo.d.ts.map +1 -0
- package/dist/shaders/DigitalVideo.js +3 -0
- package/dist/shaders/DigitalVideo.js.map +1 -0
- package/dist/shaders/DroneDisplay.d.ts +3 -0
- package/dist/shaders/DroneDisplay.d.ts.map +1 -0
- package/dist/shaders/DroneDisplay.js +3 -0
- package/dist/shaders/DroneDisplay.js.map +1 -0
- package/dist/shaders/Dufour.d.ts +3 -0
- package/dist/shaders/Dufour.d.ts.map +1 -0
- package/dist/shaders/Dufour.js +3 -0
- package/dist/shaders/Dufour.js.map +1 -0
- package/dist/shaders/EyeFromDepth.d.ts +3 -0
- package/dist/shaders/EyeFromDepth.d.ts.map +1 -0
- package/dist/shaders/EyeFromDepth.js +3 -0
- package/dist/shaders/EyeFromDepth.js.map +1 -0
- package/dist/shaders/Filmic.d.ts +3 -0
- package/dist/shaders/Filmic.d.ts.map +1 -0
- package/dist/shaders/Filmic.js +3 -0
- package/dist/shaders/Filmic.js.map +1 -0
- package/dist/shaders/Flashlight.d.ts +3 -0
- package/dist/shaders/Flashlight.d.ts.map +1 -0
- package/dist/shaders/Flashlight.js +3 -0
- package/dist/shaders/Flashlight.js.map +1 -0
- package/dist/shaders/Fog.d.ts +3 -0
- package/dist/shaders/Fog.d.ts.map +1 -0
- package/dist/shaders/Fog.js +3 -0
- package/dist/shaders/Fog.js.map +1 -0
- package/dist/shaders/Frame.d.ts +3 -0
- package/dist/shaders/Frame.d.ts.map +1 -0
- package/dist/shaders/Frame.js +3 -0
- package/dist/shaders/Frame.js.map +1 -0
- package/dist/shaders/Hash.d.ts +3 -0
- package/dist/shaders/Hash.d.ts.map +1 -0
- package/dist/shaders/Hash.js +3 -0
- package/dist/shaders/Hash.js.map +1 -0
- package/dist/shaders/Height.d.ts +3 -0
- package/dist/shaders/Height.d.ts.map +1 -0
- package/dist/shaders/Height.js +3 -0
- package/dist/shaders/Height.js.map +1 -0
- package/dist/shaders/Infrared.d.ts +3 -0
- package/dist/shaders/Infrared.d.ts.map +1 -0
- package/dist/shaders/Infrared.js +3 -0
- package/dist/shaders/Infrared.js.map +1 -0
- package/dist/shaders/Jello.d.ts +3 -0
- package/dist/shaders/Jello.d.ts.map +1 -0
- package/dist/shaders/Jello.js +3 -0
- package/dist/shaders/Jello.js.map +1 -0
- package/dist/shaders/LensDistortion.d.ts +3 -0
- package/dist/shaders/LensDistortion.d.ts.map +1 -0
- package/dist/shaders/LensDistortion.js +3 -0
- package/dist/shaders/LensDistortion.js.map +1 -0
- package/dist/shaders/Lightning.d.ts +3 -0
- package/dist/shaders/Lightning.d.ts.map +1 -0
- package/dist/shaders/Lightning.js +3 -0
- package/dist/shaders/Lightning.js.map +1 -0
- package/dist/shaders/MotionBlur.d.ts +3 -0
- package/dist/shaders/MotionBlur.d.ts.map +1 -0
- package/dist/shaders/MotionBlur.js +3 -0
- package/dist/shaders/MotionBlur.js.map +1 -0
- package/dist/shaders/MotionBlurVelocity.d.ts +3 -0
- package/dist/shaders/MotionBlurVelocity.d.ts.map +1 -0
- package/dist/shaders/MotionBlurVelocity.js +3 -0
- package/dist/shaders/MotionBlurVelocity.js.map +1 -0
- package/dist/shaders/Noise.d.ts +3 -0
- package/dist/shaders/Noise.d.ts.map +1 -0
- package/dist/shaders/Noise.js +3 -0
- package/dist/shaders/Noise.js.map +1 -0
- package/dist/shaders/Normal.d.ts +3 -0
- package/dist/shaders/Normal.d.ts.map +1 -0
- package/dist/shaders/Normal.js +3 -0
- package/dist/shaders/Normal.js.map +1 -0
- package/dist/shaders/Phase.d.ts +3 -0
- package/dist/shaders/Phase.d.ts.map +1 -0
- package/dist/shaders/Phase.js +3 -0
- package/dist/shaders/Phase.js.map +1 -0
- package/dist/shaders/Precipitation.d.ts +3 -0
- package/dist/shaders/Precipitation.d.ts.map +1 -0
- package/dist/shaders/Precipitation.js +3 -0
- package/dist/shaders/Precipitation.js.map +1 -0
- package/dist/shaders/PrecipitationShaftBlur.d.ts +3 -0
- package/dist/shaders/PrecipitationShaftBlur.d.ts.map +1 -0
- package/dist/shaders/PrecipitationShaftBlur.js +3 -0
- package/dist/shaders/PrecipitationShaftBlur.js.map +1 -0
- package/dist/shaders/PrecipitationShafts.d.ts +3 -0
- package/dist/shaders/PrecipitationShafts.d.ts.map +1 -0
- package/dist/shaders/PrecipitationShafts.js +3 -0
- package/dist/shaders/PrecipitationShafts.js.map +1 -0
- package/dist/shaders/PrecipitationWind.d.ts +3 -0
- package/dist/shaders/PrecipitationWind.d.ts.map +1 -0
- package/dist/shaders/PrecipitationWind.js +3 -0
- package/dist/shaders/PrecipitationWind.js.map +1 -0
- package/dist/shaders/RainHaze.d.ts +3 -0
- package/dist/shaders/RainHaze.d.ts.map +1 -0
- package/dist/shaders/RainHaze.js +3 -0
- package/dist/shaders/RainHaze.js.map +1 -0
- package/dist/shaders/RainRings.d.ts +3 -0
- package/dist/shaders/RainRings.d.ts.map +1 -0
- package/dist/shaders/RainRings.js +3 -0
- package/dist/shaders/RainRings.js.map +1 -0
- package/dist/shaders/Shockwave.d.ts +3 -0
- package/dist/shaders/Shockwave.d.ts.map +1 -0
- package/dist/shaders/Shockwave.js +3 -0
- package/dist/shaders/Shockwave.js.map +1 -0
- package/dist/shaders/SkyTable.d.ts +3 -0
- package/dist/shaders/SkyTable.d.ts.map +1 -0
- package/dist/shaders/SkyTable.js +3 -0
- package/dist/shaders/SkyTable.js.map +1 -0
- package/dist/shaders/SnowLine.d.ts +3 -0
- package/dist/shaders/SnowLine.d.ts.map +1 -0
- package/dist/shaders/SnowLine.js +3 -0
- package/dist/shaders/SnowLine.js.map +1 -0
- package/dist/shaders/SpeedLines.d.ts +3 -0
- package/dist/shaders/SpeedLines.d.ts.map +1 -0
- package/dist/shaders/SpeedLines.js +3 -0
- package/dist/shaders/SpeedLines.js.map +1 -0
- package/dist/shaders/Spotlight.d.ts +3 -0
- package/dist/shaders/Spotlight.d.ts.map +1 -0
- package/dist/shaders/Spotlight.js +3 -0
- package/dist/shaders/Spotlight.js.map +1 -0
- package/dist/shaders/SpotlightBeam.d.ts +3 -0
- package/dist/shaders/SpotlightBeam.d.ts.map +1 -0
- package/dist/shaders/SpotlightBeam.js +3 -0
- package/dist/shaders/SpotlightBeam.js.map +1 -0
- package/dist/shaders/SpotlightBeamBlur.d.ts +3 -0
- package/dist/shaders/SpotlightBeamBlur.d.ts.map +1 -0
- package/dist/shaders/SpotlightBeamBlur.js +3 -0
- package/dist/shaders/SpotlightBeamBlur.js.map +1 -0
- package/dist/shaders/SpotlightCone.d.ts +3 -0
- package/dist/shaders/SpotlightCone.d.ts.map +1 -0
- package/dist/shaders/SpotlightCone.js +3 -0
- package/dist/shaders/SpotlightCone.js.map +1 -0
- package/dist/shaders/Super8.d.ts +3 -0
- package/dist/shaders/Super8.d.ts.map +1 -0
- package/dist/shaders/Super8.js +3 -0
- package/dist/shaders/Super8.js.map +1 -0
- package/dist/shaders/Technicolor.d.ts +3 -0
- package/dist/shaders/Technicolor.d.ts.map +1 -0
- package/dist/shaders/Technicolor.js +3 -0
- package/dist/shaders/Technicolor.js.map +1 -0
- package/dist/shaders/TiltShift.d.ts +3 -0
- package/dist/shaders/TiltShift.d.ts.map +1 -0
- package/dist/shaders/TiltShift.js +3 -0
- package/dist/shaders/TiltShift.js.map +1 -0
- package/dist/shaders/Toy.d.ts +3 -0
- package/dist/shaders/Toy.d.ts.map +1 -0
- package/dist/shaders/Toy.js +3 -0
- package/dist/shaders/Toy.js.map +1 -0
- package/dist/shaders/Trails.d.ts +3 -0
- package/dist/shaders/Trails.d.ts.map +1 -0
- package/dist/shaders/Trails.js +3 -0
- package/dist/shaders/Trails.js.map +1 -0
- package/dist/shaders/ValleyFog.d.ts +3 -0
- package/dist/shaders/ValleyFog.d.ts.map +1 -0
- package/dist/shaders/ValleyFog.js +3 -0
- package/dist/shaders/ValleyFog.js.map +1 -0
- package/dist/shaders/WeatherMap.d.ts +3 -0
- package/dist/shaders/WeatherMap.d.ts.map +1 -0
- package/dist/shaders/WeatherMap.js +3 -0
- package/dist/shaders/WeatherMap.js.map +1 -0
- package/dist/shaders/WhiteModel.d.ts +3 -0
- package/dist/shaders/WhiteModel.d.ts.map +1 -0
- package/dist/shaders/WhiteModel.js +3 -0
- package/dist/shaders/WhiteModel.js.map +1 -0
- package/dist/snow-line.d.ts +117 -0
- package/dist/snow-line.d.ts.map +1 -0
- package/dist/snow-line.js +201 -0
- package/dist/snow-line.js.map +1 -0
- package/dist/speed-lines.d.ts +36 -0
- package/dist/speed-lines.d.ts.map +1 -0
- package/dist/speed-lines.js +65 -0
- package/dist/speed-lines.js.map +1 -0
- package/dist/spotlight.d.ts +84 -0
- package/dist/spotlight.d.ts.map +1 -0
- package/dist/spotlight.js +175 -0
- package/dist/spotlight.js.map +1 -0
- package/dist/strikes.d.ts +17 -0
- package/dist/strikes.d.ts.map +1 -0
- package/dist/strikes.js +30 -0
- package/dist/strikes.js.map +1 -0
- package/dist/super8.d.ts +78 -0
- package/dist/super8.d.ts.map +1 -0
- package/dist/super8.js +146 -0
- package/dist/super8.js.map +1 -0
- package/dist/technicolor.d.ts +32 -0
- package/dist/technicolor.d.ts.map +1 -0
- package/dist/technicolor.js +51 -0
- package/dist/technicolor.js.map +1 -0
- package/dist/tilt-shift.d.ts +60 -0
- package/dist/tilt-shift.d.ts.map +1 -0
- package/dist/tilt-shift.js +112 -0
- package/dist/tilt-shift.js.map +1 -0
- package/dist/toy.d.ts +110 -0
- package/dist/toy.d.ts.map +1 -0
- package/dist/toy.js +173 -0
- package/dist/toy.js.map +1 -0
- package/dist/valley-fog.d.ts +56 -0
- package/dist/valley-fog.d.ts.map +1 -0
- package/dist/valley-fog.js +94 -0
- package/dist/valley-fog.js.map +1 -0
- package/dist/weather-map.d.ts +132 -0
- package/dist/weather-map.d.ts.map +1 -0
- package/dist/weather-map.js +266 -0
- package/dist/weather-map.js.map +1 -0
- package/dist/white-model.d.ts +70 -0
- package/dist/white-model.d.ts.map +1 -0
- package/dist/white-model.js +94 -0
- package/dist/white-model.js.map +1 -0
- package/package.json +19 -40
- package/{cesium-post-process.js → src/cesium-post-process.js} +2 -0
- package/src/local-frame.js +57 -0
- package/{rain-rings.js → src/rain-rings.js} +14 -28
- package/src/shaders/AnalogVideo.glsl +132 -0
- package/src/shaders/Beam.glsl +108 -0
- package/src/shaders/CloudsBlur.glsl +30 -0
- package/src/shaders/CloudsComposite.glsl +59 -0
- package/src/shaders/CloudsDensity.glsl +129 -0
- package/src/shaders/CloudsDepth.glsl +26 -0
- package/src/shaders/CloudsMarch.glsl +174 -0
- package/src/shaders/CloudsResolve.glsl +46 -0
- package/src/shaders/CloudsShadow.glsl +50 -0
- package/src/shaders/CloudsShadowMap.glsl +68 -0
- package/src/shaders/CloudsSlab.glsl +58 -0
- package/src/shaders/ColorIsolation.glsl +26 -0
- package/src/shaders/DepthEdges.glsl +81 -0
- package/src/shaders/DigitalVideo.glsl +65 -0
- package/src/shaders/DroneDisplay.glsl +337 -0
- package/src/shaders/Dufour.glsl +109 -0
- package/src/shaders/EyeFromDepth.glsl +36 -0
- package/src/shaders/Filmic.glsl +5 -0
- package/src/shaders/Fog.glsl +18 -0
- package/src/shaders/Frame.glsl +10 -0
- package/src/shaders/Hash.glsl +12 -0
- package/src/shaders/Height.glsl +25 -0
- package/src/shaders/Infrared.glsl +44 -0
- package/src/shaders/Jello.glsl +41 -0
- package/src/shaders/LensDistortion.glsl +24 -0
- package/src/shaders/Lightning.glsl +257 -0
- package/src/shaders/MotionBlur.glsl +71 -0
- package/src/shaders/MotionBlurVelocity.glsl +31 -0
- package/src/shaders/Noise.glsl +43 -0
- package/src/shaders/Normal.glsl +21 -0
- package/src/shaders/Phase.glsl +6 -0
- package/src/shaders/Precipitation.glsl +199 -0
- package/src/shaders/PrecipitationShaftBlur.glsl +21 -0
- package/src/shaders/PrecipitationShafts.glsl +84 -0
- package/src/shaders/PrecipitationWind.glsl +33 -0
- package/src/shaders/RainHaze.glsl +145 -0
- package/src/shaders/RainRings.glsl +64 -0
- package/src/shaders/SkyTable.glsl +23 -0
- package/src/shaders/SnowLine.glsl +97 -0
- package/src/shaders/SnowLine.js +2 -0
- package/src/shaders/SpeedLines.glsl +61 -0
- package/src/shaders/Spotlight.glsl +89 -0
- package/src/shaders/SpotlightBeam.glsl +49 -0
- package/src/shaders/SpotlightBeamBlur.glsl +27 -0
- package/src/shaders/SpotlightCone.glsl +37 -0
- package/src/shaders/Super8.glsl +90 -0
- package/src/shaders/Technicolor.glsl +30 -0
- package/src/shaders/TiltShift.glsl +34 -0
- package/src/shaders/Toy.glsl +46 -0
- package/src/shaders/ValleyFog.glsl +40 -0
- package/src/shaders/WeatherMap.glsl +33 -0
- package/src/shaders/WhiteModel.glsl +108 -0
- package/{snow-line.js → src/snow-line.js} +71 -3
- package/local-frame.js +0 -15
- package/shaders/SnowLine.js +0 -2
- /package/{analog-video.js → src/analog-video.js} +0 -0
- /package/{blur.js → src/blur.js} +0 -0
- /package/{cloud-cover.js → src/cloud-cover.js} +0 -0
- /package/{cloud-map.js → src/cloud-map.js} +0 -0
- /package/{cloud-noise.js → src/cloud-noise.js} +0 -0
- /package/{clouds.js → src/clouds.js} +0 -0
- /package/{color-isolation.js → src/color-isolation.js} +0 -0
- /package/{depth-test.js → src/depth-test.js} +0 -0
- /package/{digital-video.js → src/digital-video.js} +0 -0
- /package/{drone-display.js → src/drone-display.js} +0 -0
- /package/{dufour.js → src/dufour.js} +0 -0
- /package/{effect.js → src/effect.js} +0 -0
- /package/{focus.js → src/focus.js} +0 -0
- /package/{frame-clock.js → src/frame-clock.js} +0 -0
- /package/{height.js → src/height.js} +0 -0
- /package/{infrared.js → src/infrared.js} +0 -0
- /package/{jello.js → src/jello.js} +0 -0
- /package/{lens-distortion.js → src/lens-distortion.js} +0 -0
- /package/{lightning.js → src/lightning.js} +0 -0
- /package/{motion-blur.js → src/motion-blur.js} +0 -0
- /package/{precipitation.js → src/precipitation.js} +0 -0
- /package/{shaders → src/shaders}/Alpenglow.js +0 -0
- /package/{shaders → src/shaders}/AnalogVideo.js +0 -0
- /package/{shaders → src/shaders}/Beam.js +0 -0
- /package/{shaders → src/shaders}/CloudsBlur.js +0 -0
- /package/{shaders → src/shaders}/CloudsComposite.js +0 -0
- /package/{shaders → src/shaders}/CloudsDensity.js +0 -0
- /package/{shaders → src/shaders}/CloudsDepth.js +0 -0
- /package/{shaders → src/shaders}/CloudsMarch.js +0 -0
- /package/{shaders → src/shaders}/CloudsResolve.js +0 -0
- /package/{shaders → src/shaders}/CloudsShadow.js +0 -0
- /package/{shaders → src/shaders}/CloudsShadowMap.js +0 -0
- /package/{shaders → src/shaders}/CloudsSlab.js +0 -0
- /package/{shaders → src/shaders}/ColorIsolation.js +0 -0
- /package/{shaders → src/shaders}/DepthEdges.js +0 -0
- /package/{shaders → src/shaders}/DigitalVideo.js +0 -0
- /package/{shaders → src/shaders}/DroneDisplay.js +0 -0
- /package/{shaders → src/shaders}/Dufour.js +0 -0
- /package/{shaders → src/shaders}/EyeFromDepth.js +0 -0
- /package/{shaders → src/shaders}/Filmic.js +0 -0
- /package/{shaders → src/shaders}/Flashlight.js +0 -0
- /package/{shaders → src/shaders}/Fog.js +0 -0
- /package/{shaders → src/shaders}/Frame.js +0 -0
- /package/{shaders → src/shaders}/Hash.js +0 -0
- /package/{shaders → src/shaders}/Height.js +0 -0
- /package/{shaders → src/shaders}/Infrared.js +0 -0
- /package/{shaders → src/shaders}/Jello.js +0 -0
- /package/{shaders → src/shaders}/LensDistortion.js +0 -0
- /package/{shaders → src/shaders}/Lightning.js +0 -0
- /package/{shaders → src/shaders}/MotionBlur.js +0 -0
- /package/{shaders → src/shaders}/MotionBlurVelocity.js +0 -0
- /package/{shaders → src/shaders}/Noise.js +0 -0
- /package/{shaders → src/shaders}/Normal.js +0 -0
- /package/{shaders → src/shaders}/Phase.js +0 -0
- /package/{shaders → src/shaders}/Precipitation.js +0 -0
- /package/{shaders → src/shaders}/PrecipitationShaftBlur.js +0 -0
- /package/{shaders → src/shaders}/PrecipitationShafts.js +0 -0
- /package/{shaders → src/shaders}/PrecipitationWind.js +0 -0
- /package/{shaders → src/shaders}/RainHaze.js +0 -0
- /package/{shaders → src/shaders}/RainRings.js +0 -0
- /package/{shaders → src/shaders}/Shockwave.js +0 -0
- /package/{shaders → src/shaders}/SkyTable.js +0 -0
- /package/{shaders → src/shaders}/SpeedLines.js +0 -0
- /package/{shaders → src/shaders}/Spotlight.js +0 -0
- /package/{shaders → src/shaders}/SpotlightBeam.js +0 -0
- /package/{shaders → src/shaders}/SpotlightBeamBlur.js +0 -0
- /package/{shaders → src/shaders}/SpotlightCone.js +0 -0
- /package/{shaders → src/shaders}/Super8.js +0 -0
- /package/{shaders → src/shaders}/Technicolor.js +0 -0
- /package/{shaders → src/shaders}/TiltShift.js +0 -0
- /package/{shaders → src/shaders}/Toy.js +0 -0
- /package/{shaders → src/shaders}/Trails.js +0 -0
- /package/{shaders → src/shaders}/ValleyFog.js +0 -0
- /package/{shaders → src/shaders}/WeatherMap.js +0 -0
- /package/{shaders → src/shaders}/WhiteModel.js +0 -0
- /package/{speed-lines.js → src/speed-lines.js} +0 -0
- /package/{spotlight.js → src/spotlight.js} +0 -0
- /package/{strikes.js → src/strikes.js} +0 -0
- /package/{super8.js → src/super8.js} +0 -0
- /package/{technicolor.js → src/technicolor.js} +0 -0
- /package/{tilt-shift.js → src/tilt-shift.js} +0 -0
- /package/{toy.js → src/toy.js} +0 -0
- /package/{valley-fog.js → src/valley-fog.js} +0 -0
- /package/{weather-map.js → src/weather-map.js} +0 -0
- /package/{white-model.js → src/white-model.js} +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// Clouds from a map of the rain, raymarched at a fraction of the resolution: the light they scatter
|
|
2
|
+
// toward the camera, and the share of the scene still seen through them, along each view ray. They
|
|
3
|
+
// fill a slab above the cloud base where the map has rain: a flat layer over drizzle, towers up to
|
|
4
|
+
// the cloud top over the heaviest rain, with a rounded base and top, shaped by billows of noise
|
|
5
|
+
// that repeats in world coordinates, read from a texture made once (cloud-noise.js): wispy over
|
|
6
|
+
// light rain and solid over heavy rain, with details eroding their edges, not their cores. The sun lights them through a few
|
|
7
|
+
// samples toward it, with a silver lining toward it, its light scattered more than once brightening
|
|
8
|
+
// their cores, and the sky lights them, brighter at their top: thick clouds are dark gray from
|
|
9
|
+
// below and white from above. The steps are short near the camera and longer with the distance, so
|
|
10
|
+
// a camera inside a cloud is in its fog. Precipitation, activated after them, draws the rain's haze
|
|
11
|
+
// over them. Needs EyeFromDepth, Height, CloudsSlab, WeatherMap, CloudsDensity, Fog, Phase and
|
|
12
|
+
// RainHaze.
|
|
13
|
+
precision highp sampler2D;
|
|
14
|
+
uniform sampler2D depthTexture;
|
|
15
|
+
// the farthest distance of the scene in this texel's block of pixels, from CloudsDepth.glsl
|
|
16
|
+
uniform sampler2D cloudDepth;
|
|
17
|
+
// the highest rain around each block of the map's pixels, over both maps, from weather-map.js
|
|
18
|
+
uniform sampler2D maxMap;
|
|
19
|
+
// the frames drawn, for the jitter to change at each, and CloudsResolve.glsl to accumulate them
|
|
20
|
+
uniform float frame;
|
|
21
|
+
in vec2 v_textureCoordinates;
|
|
22
|
+
|
|
23
|
+
const int STEPS = 32;
|
|
24
|
+
// the ray is probed at this many points of the max map before its march, less than a block of it
|
|
25
|
+
// apart over MAX_DISTANCE, 5 km for the 4 km blocks of a 1 km map: the march starts where the ray
|
|
26
|
+
// drops below the tallest cloud they find, and is skipped where they find no rain, rather than
|
|
27
|
+
// spending its steps in the empty air above the clouds (the coverage early-out of Schneider 2015)
|
|
28
|
+
const int RAY_PROBES = 8;
|
|
29
|
+
// the sun's light through the cloud, sampled at these distances toward it, in meters
|
|
30
|
+
const vec2 LIGHT_DISTANCES = vec2(200.0, 700.0);
|
|
31
|
+
// the sky's light on the clouds at their base and at their top, by day, and the moon's share of it
|
|
32
|
+
// at night. By day, their tops see the sky overhead, in the color of Cesium's at its luminance, and
|
|
33
|
+
// their bases the sunlight the ground bounces (Hillaire 2016, sec. 5.5.1), less as the sun is lower
|
|
34
|
+
// than this sine of its height. Cesium's sky itself, and an albedo of 0.1 to 0.3 for the ground,
|
|
35
|
+
// would leave the tops gray: our two samples toward the sun let little of it through
|
|
36
|
+
const vec3 AMBIENT_BASE = vec3(0.32, 0.35, 0.40);
|
|
37
|
+
const vec3 AMBIENT_TOP = vec3(0.62, 0.66, 0.72);
|
|
38
|
+
const float HIGH_SUN = 0.5;
|
|
39
|
+
// the sky's color on the clouds' tops is desaturated toward its gray, keeping this share of it: in
|
|
40
|
+
// full, its hue turns the tops sky blue, where the sun's white light dominates them (Hillaire 2016,
|
|
41
|
+
// sec. 5.5.1, lets artists desaturate the sky's light)
|
|
42
|
+
const float SKY_SATURATION = 0.3;
|
|
43
|
+
// the sky's light inside a cloud is occluded by its dimensional profile, its height profile times
|
|
44
|
+
// its coverage, pow(1 - dimensional_profile, 0.5) (Schneider 2022): bright at its edges and top,
|
|
45
|
+
// dark in its core; and by the lack of light from below at its base, in the share of its column's height
|
|
46
|
+
// pow(remap(h, 0.07, 0.14, 0.1, 1.0), 0.8) (Schneider 2017): its bases are dark
|
|
47
|
+
const vec2 DARK_BASE = vec2(0.07, 0.14);
|
|
48
|
+
// the clouds over the heaviest rain absorb this share of the light they intercept, for the
|
|
49
|
+
// "foreboding dark clouds" of Horizon Zero Dawn (Schneider 2015)
|
|
50
|
+
const float RAIN_ALBEDO = 0.8;
|
|
51
|
+
const float SUN = 0.8;
|
|
52
|
+
// the sun's light scattered more than once, as octaves of the light scattered once (Wrenninge's,
|
|
53
|
+
// Hillaire 2016, sec. 5.8, eq. 19-20): octave n has a^n of the scattering, b^n of the extinction and
|
|
54
|
+
// c^n of the phase's eccentricity, so it reaches deeper into the cloud, more alike in all
|
|
55
|
+
// directions. a <= b keeps it from scattering more light than reaches it; 0.5 each, Unreal's
|
|
56
|
+
// defaults, and 2 octaves, as Unreal and RDR2
|
|
57
|
+
const int OCTAVES = 2;
|
|
58
|
+
const float OCTAVE_SCATTERING = 0.5;
|
|
59
|
+
const float OCTAVE_EXTINCTION = 0.5;
|
|
60
|
+
const float OCTAVE_ECCENTRICITY = 0.5;
|
|
61
|
+
const vec3 MOONLIGHT = vec3(0.60, 0.63, 0.70);
|
|
62
|
+
|
|
63
|
+
// Henyey-Greenstein's phase function, times 4 pi: 1 for light scattered alike in all directions
|
|
64
|
+
float phase(float cosTheta, float g) {
|
|
65
|
+
return 4.0 * czm_pi * henyeyGreenstein(cosTheta, g);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
void main() {
|
|
69
|
+
vec4 eye = eyeAt(depthTexture, v_textureCoordinates);
|
|
70
|
+
vec3 direction = normalize(eye.xyz);
|
|
71
|
+
// the farthest of the texel's pixels, the sky past the slab: the slab ends its rays
|
|
72
|
+
float sceneDistance = texture(cloudDepth, v_textureCoordinates).r;
|
|
73
|
+
vec2 segment = slab(dot(direction, up), sceneDistance, slabTop);
|
|
74
|
+
float span = segment.y - segment.x;
|
|
75
|
+
if (span <= 0.0) {
|
|
76
|
+
out_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
vec3 directionWC = czm_inverseViewRotation * direction;
|
|
80
|
+
// the clouds' map's coverage, and its tallest type
|
|
81
|
+
float covered = 0.0;
|
|
82
|
+
float highest = 0.0;
|
|
83
|
+
for (int k = 0; k < RAY_PROBES; k++) {
|
|
84
|
+
vec2 uv = mapUv(czm_viewerPositionWC + directionWC * (segment.x + span * (float(k) + 0.5) / float(RAY_PROBES)));
|
|
85
|
+
if (all(greaterThanEqual(uv, vec2(0.0))) && all(lessThanEqual(uv, vec2(1.0)))) {
|
|
86
|
+
vec4 cell = texture(maxMap, uv);
|
|
87
|
+
covered = max(covered, cell.g);
|
|
88
|
+
highest = max(highest, cell.b);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
segment = slab(dot(direction, up), sceneDistance, cloudBase + mix(THIN_DEPTH, cloudTop - cloudBase, highest));
|
|
92
|
+
span = segment.y - segment.x;
|
|
93
|
+
if (covered <= 0.0 || span <= 0.0) {
|
|
94
|
+
out_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
vec3 lightWC = czm_inverseViewRotation * czm_lightDirectionEC;
|
|
98
|
+
// a forward lobe for the silver lining, a weak backward one, for each octave: the sun is a
|
|
99
|
+
// direction, the angle is the same along the ray
|
|
100
|
+
float cosTheta = dot(direction, czm_lightDirectionEC);
|
|
101
|
+
float octaves[OCTAVES];
|
|
102
|
+
float contribution = 1.0;
|
|
103
|
+
float eccentricity = 1.0;
|
|
104
|
+
for (int n = 0; n < OCTAVES; n++) {
|
|
105
|
+
octaves[n] = contribution * mix(phase(cosTheta, -0.2 * eccentricity), phase(cosTheta, 0.6 * eccentricity), 0.7);
|
|
106
|
+
contribution *= OCTAVE_SCATTERING;
|
|
107
|
+
eccentricity *= OCTAVE_ECCENTRICITY;
|
|
108
|
+
}
|
|
109
|
+
float day = daylight();
|
|
110
|
+
// the far clouds fade into the sky behind them as Cesium's fog fades the terrain, by its factor at
|
|
111
|
+
// each step's distance: the same aerial perspective on the clouds as on the earth, without which
|
|
112
|
+
// "a visual discrepancy happens at the horizon between clouds and earth" (Hillaire 2016, sec.
|
|
113
|
+
// 5.9.1). The sky toward the view, at least SKY_ELEVATION above the horizon
|
|
114
|
+
vec3 fogColor = skyToward(direction, max(asin(clamp(dot(direction, up), -1.0, 1.0)), SKY_ELEVATION));
|
|
115
|
+
vec3 sunLight = SUN * czm_lightColor * day;
|
|
116
|
+
// the sky overhead, and the sunlight from the ground, by day; the moon's at night
|
|
117
|
+
vec3 zenith = clearSkyBelow(cloudBase, czm_inverseViewRotation * up, czm_lightDirectionWC);
|
|
118
|
+
vec3 skyHue = mix(vec3(1.0), zenith / max(czm_luminance(zenith), 1e-3), SKY_SATURATION);
|
|
119
|
+
vec3 skyAbove = mix(MOONLIGHT, skyHue, day) * czm_luminance(AMBIENT_TOP);
|
|
120
|
+
vec3 groundBelow = AMBIENT_BASE * mix(MOONLIGHT, czm_lightColor * clamp(dot(up, czm_lightDirectionEC) / HIGH_SUN, 0.0, 1.0), day);
|
|
121
|
+
// interleaved gradient noise, a different start along the ray for each pixel, and at each frame,
|
|
122
|
+
// by the golden ratio (Wolfe 2020)
|
|
123
|
+
// the angle a pixel of this pass covers
|
|
124
|
+
float pixelAngle = 2.0 / (czm_projection[1][1] * czm_viewport.w);
|
|
125
|
+
float jitter = fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))) + 0.618034 * frame);
|
|
126
|
+
vec3 light = vec3(0.0);
|
|
127
|
+
float transmittance = 1.0;
|
|
128
|
+
float rain;
|
|
129
|
+
float column;
|
|
130
|
+
float dimensional;
|
|
131
|
+
float unused;
|
|
132
|
+
for (int i = 0; i < STEPS; i++) {
|
|
133
|
+
float s = (float(i) + jitter) / float(STEPS);
|
|
134
|
+
float t = segment.x + span * s * s;
|
|
135
|
+
float dt = span * (2.0 * s + 1.0 / float(STEPS)) / float(STEPS);
|
|
136
|
+
vec3 pointEC = direction * t;
|
|
137
|
+
float h = heightAt(pointEC);
|
|
138
|
+
vec3 pointWC = czm_viewerPositionWC + directionWC * t;
|
|
139
|
+
float footprint = t * pixelAngle;
|
|
140
|
+
float sigma = EXTINCTION * cloudDensity(pointWC, h, footprint, rain, column, dimensional);
|
|
141
|
+
if (sigma <= 0.0) {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
// the sun's light through the cloud toward it
|
|
145
|
+
float opticalDepth = 0.0;
|
|
146
|
+
float previous = 0.0;
|
|
147
|
+
for (int j = 0; j < 2; j++) {
|
|
148
|
+
// jittered as the step, for the samples of neighboring pixels not to band (Hillaire 2016,
|
|
149
|
+
// sec. 5.5.2)
|
|
150
|
+
float distanceToward = LIGHT_DISTANCES[j] * (0.75 + 0.5 * jitter);
|
|
151
|
+
opticalDepth += EXTINCTION * cloudDensity(pointWC + lightWC * distanceToward, heightAt(pointEC + czm_lightDirectionEC * distanceToward), footprint, unused, unused, unused) * (distanceToward - previous);
|
|
152
|
+
previous = distanceToward;
|
|
153
|
+
}
|
|
154
|
+
float sunThrough = 0.0;
|
|
155
|
+
float occlusion = 1.0;
|
|
156
|
+
for (int n = 0; n < OCTAVES; n++) {
|
|
157
|
+
sunThrough += octaves[n] * exp(-opticalDepth * occlusion);
|
|
158
|
+
occlusion *= OCTAVE_EXTINCTION;
|
|
159
|
+
}
|
|
160
|
+
float y = clamp((h - cloudBase) / (cloudTop - cloudBase), 0.0, 1.0);
|
|
161
|
+
float ambientOcclusion = sqrt(max(1.0 - dimensional, 0.0)) * pow(mix(0.1, 1.0, clamp((column - DARK_BASE.x) / (DARK_BASE.y - DARK_BASE.x), 0.0, 1.0)), 0.8);
|
|
162
|
+
vec3 scattered = sunLight * sunThrough + mix(groundBelow, skyAbove, y) * ambientOcclusion;
|
|
163
|
+
float stepTransmittance = exp(-sigma * dt);
|
|
164
|
+
// the light scattered over the step, the integral of the source over it, (S - S T) / sigma_t
|
|
165
|
+
// (Hillaire 2016, eq. 17): the albedo, sigma_s / sigma_t, of what the step intercepts
|
|
166
|
+
vec3 seen = czm_fog(t, scattered * mix(1.0, RAIN_ALBEDO, rain), fogColor, czm_fogVisualDensityScalar);
|
|
167
|
+
light += transmittance * seen * (1.0 - stepTransmittance);
|
|
168
|
+
transmittance *= stepTransmittance;
|
|
169
|
+
if (transmittance < 0.03) {
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
out_FragColor = vec4(min(light, vec3(1.0)), transmittance);
|
|
174
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// The clouds accumulated over the frames, at the march's resolution: each frame's march, jittered
|
|
2
|
+
// anew, blended into the clouds of the previous frames, reprojected to where they are seen now, as
|
|
3
|
+
// Frostbite's, whose 14 samples a frame "look converged" (Hillaire 2016, sec. 5.5.3). The previous
|
|
4
|
+
// frames' clouds are reprojected through where the ray enters the slab, near what is seen of them
|
|
5
|
+
// from outside, rather than through their transmittance-weighted distance (Sakmary 2022), which the
|
|
6
|
+
// march has no channel left for, and clamped to the current frame's 3 x 3 neighborhood so that they
|
|
7
|
+
// do not trail behind what moved. Needs EyeFromDepth, Height and CloudsSlab.
|
|
8
|
+
precision highp sampler2D;
|
|
9
|
+
uniform sampler2D depthTexture;
|
|
10
|
+
// the farthest distance of the scene in this texel's block of pixels, from CloudsDepth.glsl
|
|
11
|
+
uniform sampler2D cloudDepth;
|
|
12
|
+
// this frame's march, and the accumulation of the previous frames, from clouds.js
|
|
13
|
+
uniform sampler2D cloudTexture;
|
|
14
|
+
uniform sampler2D historyTexture;
|
|
15
|
+
// from the eye coordinates of this frame to the clip coordinates of the previous one
|
|
16
|
+
uniform mat4 reprojection;
|
|
17
|
+
// the share of the previous frames in the blend, 0 when there are none
|
|
18
|
+
uniform float historyWeight;
|
|
19
|
+
in vec2 v_textureCoordinates;
|
|
20
|
+
|
|
21
|
+
// inside the slab, the clouds are reprojected through a point this far along the ray, in meters
|
|
22
|
+
const float INSIDE_DISTANCE = 2000.0;
|
|
23
|
+
|
|
24
|
+
void main() {
|
|
25
|
+
vec4 current = texture(cloudTexture, v_textureCoordinates);
|
|
26
|
+
// czm_viewport is this pass's texture, the march's size
|
|
27
|
+
vec2 texel = 1.0 / czm_viewport.zw;
|
|
28
|
+
vec4 low = current;
|
|
29
|
+
vec4 high = current;
|
|
30
|
+
for (int y = -1; y <= 1; y++) {
|
|
31
|
+
for (int x = -1; x <= 1; x++) {
|
|
32
|
+
vec4 neighbor = texture(cloudTexture, v_textureCoordinates + vec2(float(x), float(y)) * texel);
|
|
33
|
+
low = min(low, neighbor);
|
|
34
|
+
high = max(high, neighbor);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
vec3 direction = normalize(eyeAt(depthTexture, v_textureCoordinates).xyz);
|
|
38
|
+
vec2 segment = slab(dot(direction, up), texture(cloudDepth, v_textureCoordinates).r, slabTop);
|
|
39
|
+
// where the ray misses the slab, nothing is there to move: only the view turns
|
|
40
|
+
vec4 point = segment.y > segment.x ? vec4(direction * max(segment.x, min(segment.y, INSIDE_DISTANCE)), 1.0) : vec4(direction, 0.0);
|
|
41
|
+
vec4 clip = reprojection * point;
|
|
42
|
+
vec2 previous = clip.xy / clip.w * 0.5 + 0.5;
|
|
43
|
+
bool seen = clip.w > 0.0 && all(greaterThanEqual(previous, vec2(0.0))) && all(lessThanEqual(previous, vec2(1.0)));
|
|
44
|
+
vec4 history = clamp(texture(historyTexture, previous), low, high);
|
|
45
|
+
out_FragColor = mix(current, history, seen ? historyWeight : 0.0);
|
|
46
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// The clouds' shadow map, a Beer shadow map: across an area around the camera, seen from the sun,
|
|
2
|
+
// the optical depth of the clouds along the sun's rays, from the top of the slab down to each
|
|
3
|
+
// quarter of its height, so that a point finds how much cloud lies between it and the sun. One
|
|
4
|
+
// read rather than a march toward the sun, as Unreal's (it loses only the "volumetric self shadow
|
|
5
|
+
// color") and three-clouds' in WebGL2.
|
|
6
|
+
precision highp sampler2D;
|
|
7
|
+
uniform sampler2D shadowMap;
|
|
8
|
+
// the ground point the map is centered on, in world coordinates, and the base and the top of the
|
|
9
|
+
// slab it covers, in meters above the ellipsoid, from clouds.js
|
|
10
|
+
uniform vec3 shadowCenter;
|
|
11
|
+
// the map's side, in meters, wider as the camera is higher, from clouds.js
|
|
12
|
+
uniform float shadowExtent;
|
|
13
|
+
uniform float shadowBase;
|
|
14
|
+
uniform float shadowTop;
|
|
15
|
+
|
|
16
|
+
// the shadow fades out over the outer share of the map's half side, so that its edge does not show
|
|
17
|
+
const float SHADOW_FADE = 0.2;
|
|
18
|
+
|
|
19
|
+
// the axes of the map, across the sun's rays: the sun's direction in world coordinates crossed
|
|
20
|
+
// with the up at its center, and the third direction
|
|
21
|
+
void shadowAxes(out vec3 across, out vec3 along) {
|
|
22
|
+
vec3 up = normalize(shadowCenter);
|
|
23
|
+
across = cross(czm_lightDirectionWC, up);
|
|
24
|
+
across = dot(across, across) > 1e-6 ? normalize(across) : normalize(cross(czm_lightDirectionWC, vec3(1.0, 0.0, 0.0)));
|
|
25
|
+
along = cross(czm_lightDirectionWC, across);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// a point's height above the sphere through the map's center: over the map, it differs from the
|
|
29
|
+
// height above the ellipsoid by meters
|
|
30
|
+
float shadowHeight(vec3 positionWC) {
|
|
31
|
+
return length(positionWC) - length(shadowCenter);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// the optical depth of the clouds between a point in world coordinates and the sun, 0 off the map
|
|
35
|
+
float shadowDepth(vec3 positionWC) {
|
|
36
|
+
vec3 across;
|
|
37
|
+
vec3 along;
|
|
38
|
+
shadowAxes(across, along);
|
|
39
|
+
vec3 offset = positionWC - shadowCenter;
|
|
40
|
+
vec2 uv = vec2(dot(offset, across), dot(offset, along)) / shadowExtent + 0.5;
|
|
41
|
+
float edge = 2.0 * max(abs(uv.x - 0.5), abs(uv.y - 0.5));
|
|
42
|
+
if (edge >= 1.0) {
|
|
43
|
+
return 0.0;
|
|
44
|
+
}
|
|
45
|
+
float fade = 1.0 - smoothstep(1.0 - SHADOW_FADE, 1.0, edge);
|
|
46
|
+
vec4 depths = texture(shadowMap, uv);
|
|
47
|
+
// the share of the slab above the point, in quarters, through the depths at each
|
|
48
|
+
float f = 4.0 * clamp((shadowTop - shadowHeight(positionWC)) / max(shadowTop - shadowBase, 1.0), 0.0, 1.0);
|
|
49
|
+
return fade * (f < 1.0 ? f * depths.x : f < 2.0 ? mix(depths.x, depths.y, f - 1.0) : f < 3.0 ? mix(depths.y, depths.z, f - 2.0) : mix(depths.z, depths.w, f - 3.0));
|
|
50
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// The clouds' shadow map, drawn by clouds.js into its own texture: for each texel, the sun's ray
|
|
2
|
+
// through it marched from the top of the slab down to its base, the optical depth of the clouds
|
|
3
|
+
// kept at each quarter of the slab's height, unless the ray crosses no clouds. Needs CloudsSlab,
|
|
4
|
+
// WeatherMap, Noise, CloudsDensity and CloudsShadow.
|
|
5
|
+
// the highest coverage around each block of the clouds' map, from weather-map.js
|
|
6
|
+
precision highp sampler2D;
|
|
7
|
+
uniform sampler2D maxMap;
|
|
8
|
+
in vec2 v_textureCoordinates;
|
|
9
|
+
|
|
10
|
+
// the steps along each ray, 4 for each quarter, and the texels across, clouds.js's SHADOW_SIZE, for
|
|
11
|
+
// a texel's footprint, for the noise's mipmap
|
|
12
|
+
const int SHADOW_STEPS = 16;
|
|
13
|
+
const float SHADOW_SIZE = 512.0;
|
|
14
|
+
// the ray is probed at this many points of the max map before its march, as the clouds' march, and
|
|
15
|
+
// skipped where they find no clouds: the max map's 12 km windows overlap between probes as long as
|
|
16
|
+
// the ray crosses the slab over less than about 100 km, the sun above about 4 degrees; lower, a
|
|
17
|
+
// small cell between two probes casts no shadow
|
|
18
|
+
const int SHADOW_PROBES = 8;
|
|
19
|
+
// the sun is taken this high at least, the sine of its height: lower, its rays cross the slab over
|
|
20
|
+
// more than 100 km
|
|
21
|
+
const float LOW_SUN = 0.05;
|
|
22
|
+
|
|
23
|
+
void main() {
|
|
24
|
+
vec3 across;
|
|
25
|
+
vec3 along;
|
|
26
|
+
shadowAxes(across, along);
|
|
27
|
+
vec2 xy = (v_textureCoordinates - 0.5) * shadowExtent;
|
|
28
|
+
vec3 start = shadowCenter + across * xy.x + along * xy.y;
|
|
29
|
+
float sine = dot(czm_lightDirectionWC, normalize(start));
|
|
30
|
+
if (sine <= 0.0) {
|
|
31
|
+
// the sun is down: no shadows to speak of
|
|
32
|
+
out_FragColor = vec4(0.0);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
sine = max(sine, LOW_SUN);
|
|
36
|
+
float h0 = shadowHeight(start);
|
|
37
|
+
// from the top of the slab down to its base, along the ray
|
|
38
|
+
float top = (slabTop - h0) / sine;
|
|
39
|
+
float base = (cloudBase - h0) / sine;
|
|
40
|
+
float covered = 0.0;
|
|
41
|
+
for (int k = 0; k < SHADOW_PROBES; k++) {
|
|
42
|
+
vec2 uv = mapUv(start + czm_lightDirectionWC * mix(top, base, (float(k) + 0.5) / float(SHADOW_PROBES)));
|
|
43
|
+
if (all(greaterThanEqual(uv, vec2(0.0))) && all(lessThanEqual(uv, vec2(1.0)))) {
|
|
44
|
+
covered = max(covered, texture(maxMap, uv).g);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (covered <= 0.0) {
|
|
48
|
+
out_FragColor = vec4(0.0);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
float ds = (top - base) / float(SHADOW_STEPS);
|
|
52
|
+
float depth = 0.0;
|
|
53
|
+
vec4 depths = vec4(0.0);
|
|
54
|
+
float unused;
|
|
55
|
+
for (int i = 0; i < SHADOW_STEPS; i++) {
|
|
56
|
+
vec3 point = start + czm_lightDirectionWC * mix(top, base, (float(i) + 0.5) / float(SHADOW_STEPS));
|
|
57
|
+
depth += EXTINCTION * cloudDensity(point, shadowHeight(point), shadowExtent / SHADOW_SIZE, unused, unused, unused) * ds;
|
|
58
|
+
if (i == SHADOW_STEPS / 4 - 1) {
|
|
59
|
+
depths.x = depth;
|
|
60
|
+
} else if (i == SHADOW_STEPS / 2 - 1) {
|
|
61
|
+
depths.y = depth;
|
|
62
|
+
} else if (i == 3 * SHADOW_STEPS / 4 - 1) {
|
|
63
|
+
depths.z = depth;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
depths.w = depth;
|
|
67
|
+
out_FragColor = depths;
|
|
68
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// The slab of the clouds along a view ray, which the march and the resolve share: where the ray's
|
|
2
|
+
// height reaches a height, and the part of the ray in the slab. Needs Height.
|
|
3
|
+
// meters above the ellipsoid
|
|
4
|
+
uniform float cloudBase;
|
|
5
|
+
// the top of the tallest cloud the map makes, where the march starts from above, from clouds.js
|
|
6
|
+
uniform float slabTop;
|
|
7
|
+
|
|
8
|
+
// the ray is marched as far as this from where it enters the slab, in meters, not from the camera:
|
|
9
|
+
// from far above, the slab itself is farther than that. A grazing ray marched farther would take
|
|
10
|
+
// steps longer than the billows and turn the far clouds into streaks; deeper than this into the
|
|
11
|
+
// slab, it is nearly always behind a cloud
|
|
12
|
+
const float MAX_DISTANCE = 40000.0;
|
|
13
|
+
|
|
14
|
+
// where the height along the view ray, at a distance t in direction k = dot(direction, up), reaches
|
|
15
|
+
// c: the height is cameraHeight + k t + (1 - k k) t t / (2 radius), as heightAt's. False if it never
|
|
16
|
+
// does. Without the cancellation of the textbook formula, also for a vertical ray, where the
|
|
17
|
+
// quadratic term is 0
|
|
18
|
+
bool crossings(float c, float k, out float near, out float far) {
|
|
19
|
+
float a = (1.0 - k * k) / (2.0 * radius);
|
|
20
|
+
float d = cameraHeight - c;
|
|
21
|
+
float discriminant = k * k - 4.0 * a * d;
|
|
22
|
+
if (discriminant < 0.0) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
float q = -0.5 * (k + (k < 0.0 ? -1.0 : 1.0) * sqrt(discriminant));
|
|
26
|
+
q = q == 0.0 ? 1e-9 : q;
|
|
27
|
+
float r0 = a > 1e-12 ? q / a : (q > 0.0 ? 1e20 : -1e20);
|
|
28
|
+
float r1 = d / q;
|
|
29
|
+
near = min(r0, r1);
|
|
30
|
+
far = max(r0, r1);
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// the part of the ray in the slab up to a top, from where it enters it to where it leaves it, meets
|
|
35
|
+
// the ground or is MAX_DISTANCE long; empty when it misses the slab
|
|
36
|
+
vec2 slab(float k, float sceneDistance, float top) {
|
|
37
|
+
float near;
|
|
38
|
+
float far;
|
|
39
|
+
// always above the tops
|
|
40
|
+
if (!crossings(top, k, near, far)) {
|
|
41
|
+
return vec2(0.0);
|
|
42
|
+
}
|
|
43
|
+
float start = max(near, 0.0);
|
|
44
|
+
float end = far;
|
|
45
|
+
if (crossings(cloudBase, k, near, far)) {
|
|
46
|
+
if (cameraHeight >= cloudBase) {
|
|
47
|
+
// going down below the base
|
|
48
|
+
if (near > 0.0) {
|
|
49
|
+
end = min(end, near);
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
// coming up through the base
|
|
53
|
+
start = max(start, far);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
end = min(end, min(sceneDistance, start + MAX_DISTANCE));
|
|
57
|
+
return vec2(start, max(end, start));
|
|
58
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Color isolation: one hue keeps its color, the rest of the scene turns gray. After prod80's
|
|
2
|
+
// ReShade Color Isolation (MIT), https://github.com/prod80/prod80-ReShade-Repository
|
|
3
|
+
precision highp sampler2D;
|
|
4
|
+
uniform sampler2D colorTexture;
|
|
5
|
+
// the hue kept and the half width of the selection, 0 to 1 for the whole circle
|
|
6
|
+
uniform float hue;
|
|
7
|
+
uniform float range;
|
|
8
|
+
// 0 to 1
|
|
9
|
+
uniform float strength;
|
|
10
|
+
in vec2 v_textureCoordinates;
|
|
11
|
+
|
|
12
|
+
void main() {
|
|
13
|
+
vec4 sceneColor = texture(colorTexture, v_textureCoordinates);
|
|
14
|
+
vec3 color = clamp(sceneColor.rgb, 0.0, 1.0);
|
|
15
|
+
float gray = czm_luminance(color);
|
|
16
|
+
float h = czm_RGBToHSL(color).x;
|
|
17
|
+
// a triangle around the hue, on the circle
|
|
18
|
+
float r = 1.0 / max(range, 1e-3);
|
|
19
|
+
float weight = max(1.0 - abs((h - hue) * r), 0.0)
|
|
20
|
+
+ max(1.0 - abs((h + 1.0 - hue) * r), 0.0)
|
|
21
|
+
+ max(1.0 - abs((h - 1.0 - hue) * r), 0.0);
|
|
22
|
+
float w = clamp(weight, 0.0, 1.0);
|
|
23
|
+
float keep = w * w * w * (w * (w * 6.0 - 15.0) + 10.0);
|
|
24
|
+
vec3 isolated = mix(vec3(gray), color, keep);
|
|
25
|
+
out_FragColor = vec4(mix(color, isolated, strength), sceneColor.a);
|
|
26
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// The edges found in the depth, shared by Toy and WhiteModel, after EyeFromDepth: how far a pixel
|
|
2
|
+
// lies, how large a pixel is there, the depth's neighbors around it, how sharply it bends between
|
|
3
|
+
// them (a crease, not across a jump: an edge in front of something farther, nor the gentle bends
|
|
4
|
+
// between the terrain's triangles), the outline on the near side of a jump; the sky's gradient.
|
|
5
|
+
// its samplers read in high precision, whatever comes before (a phone's GPU's default is low)
|
|
6
|
+
precision highp sampler2D;
|
|
7
|
+
uniform sampler2D depthTexture;
|
|
8
|
+
|
|
9
|
+
// how much the depth bends, in pixels' sizes, to start and to end lighting an edge
|
|
10
|
+
const vec2 CREASE = vec2(0.6, 1.6);
|
|
11
|
+
// how far the depth jumps, in pixels' sizes, to be an edge in front of something farther, not a crease
|
|
12
|
+
uniform float jump;
|
|
13
|
+
// the bevel's widest, in pixels: its neighbors read that far at the most
|
|
14
|
+
const float BEVEL = 8.0;
|
|
15
|
+
// the sky's depth, far off
|
|
16
|
+
const float SKY = 1e9;
|
|
17
|
+
|
|
18
|
+
// how far the pixel at uv lies, in meters: in an orthographic view past its near plane, small
|
|
19
|
+
// numbers whose differences keep their precision (its camera thousands of meters back: some
|
|
20
|
+
// phones' GPUs, Mali, lose it subtracting depths that large), in a perspective one from the camera
|
|
21
|
+
float depthAt(vec2 uv) {
|
|
22
|
+
if (czm_orthographicIn3D == 1.0) {
|
|
23
|
+
float raw = texture(depthTexture, uv).r;
|
|
24
|
+
return raw >= 1.0 ? SKY : raw * (czm_currentFrustum.y - czm_currentFrustum.x);
|
|
25
|
+
}
|
|
26
|
+
vec4 eye = eyeAt(depthTexture, uv);
|
|
27
|
+
return eye.w == 0.0 ? SKY : -eye.z;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// a pixel's size in meters at a depth: an orthographic view's the same everywhere, a perspective's
|
|
31
|
+
// growing with the depth
|
|
32
|
+
float pixelAt(float depth) {
|
|
33
|
+
return 2.0 / (czm_projection[0][0] * czm_viewport.z) * (czm_orthographicIn3D == 1.0 ? 1.0 : depth);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// the depths of the neighbors steps pixels away from uv, less its own c: right, left, up, down
|
|
37
|
+
vec4 neighborsAt(vec2 uv, float c, float steps) {
|
|
38
|
+
vec2 o = steps / czm_viewport.zw;
|
|
39
|
+
return vec4(depthAt(uv + vec2(o.x, 0.0)), depthAt(uv - vec2(o.x, 0.0)), depthAt(uv + vec2(0.0, o.y)), depthAt(uv - vec2(0.0, o.y))) - c;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// how sharply the depth bends between neighbors n a span of meters apart, from 0 to 1, none across
|
|
43
|
+
// a jump; convex where they lie farther than the middle, their sum positive
|
|
44
|
+
float creaseOf(vec4 n, float span, float pixel) {
|
|
45
|
+
float far = max(max(abs(n.x), abs(n.y)), max(abs(n.z), abs(n.w)));
|
|
46
|
+
return smoothstep(CREASE.x, CREASE.y, (abs(n.x + n.y) + abs(n.z + n.w)) / span) * (1.0 - step(jump * pixel, far));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// how far the surface beyond the pixel at uv lies behind it, in one direction o (a pixel's step): the two neighbours
|
|
50
|
+
// that way extrapolated back to the pixel, linearly in an orthographic view, where the depth is affine on the screen,
|
|
51
|
+
// in its reciprocal in a perspective one. A plane at any slope extrapolates exactly to the pixel, so a face seen at a
|
|
52
|
+
// grazing angle is never a jump, only a nearer thing standing in front of a farther one. The nearer of the extrapolation
|
|
53
|
+
// and the neighbour itself: beside a thin thing two pixels away, the extrapolation through it runs far behind the pixel
|
|
54
|
+
float farSide(vec2 uv, vec2 o, float c) {
|
|
55
|
+
float d1 = depthAt(uv + o);
|
|
56
|
+
float d2 = depthAt(uv + 2.0 * o);
|
|
57
|
+
if (d1 == SKY) {
|
|
58
|
+
return SKY;
|
|
59
|
+
}
|
|
60
|
+
if (czm_orthographicIn3D == 1.0) {
|
|
61
|
+
return min(d1, d2 == SKY ? d1 : 2.0 * d1 - d2) - c;
|
|
62
|
+
}
|
|
63
|
+
float r = d2 == SKY ? 1.0 / d1 : 2.0 / d1 - 1.0 / d2;
|
|
64
|
+
return (r <= 0.0 ? d1 : min(d1, 1.0 / r)) - c;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// the outline, a pixel wide, on the near side of a jump: the farthest of the four directions' surfaces behind the pixel,
|
|
68
|
+
// against the jump, anti-aliased over a quarter of it each way (n and steps, the creases' neighbours, unused here: the
|
|
69
|
+
// outline reads its own)
|
|
70
|
+
float outlineAt(vec2 uv, float c, vec4 n, float steps, float pixel) {
|
|
71
|
+
vec2 texel = 1.0 / czm_viewport.zw;
|
|
72
|
+
float farther = max(max(farSide(uv, vec2(texel.x, 0.0), c), farSide(uv, vec2(-texel.x, 0.0), c)),
|
|
73
|
+
max(farSide(uv, vec2(0.0, texel.y), c), farSide(uv, vec2(0.0, -texel.y), c)));
|
|
74
|
+
float limit = jump * pixel;
|
|
75
|
+
return smoothstep(0.75 * limit, 1.25 * limit, farther);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// the sky's gradient at uv, from the top of the screen to its bottom
|
|
79
|
+
vec3 skyAt(vec2 uv, vec4 top, vec4 bottom) {
|
|
80
|
+
return mix(bottom.rgb, top.rgb, smoothstep(0.0, 1.0, uv.y));
|
|
81
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// A digital FPV video feed and its breakups: clean, slightly punchy colors, until a weak signal
|
|
2
|
+
// breaks the picture into macroblocks, some displaced, strips shifted sideways and the color
|
|
3
|
+
// channels split, and at worst a short black screen. A block keeps only its lowest frequencies,
|
|
4
|
+
// as a codec that has thrown its detail away: a gradient between its corners, with fewer colors.
|
|
5
|
+
// The displaced blocks and strips follow three.js's DigitalGlitch. Without the previous frames,
|
|
6
|
+
// there are no freezes.
|
|
7
|
+
precision highp sampler2D;
|
|
8
|
+
uniform sampler2D colorTexture;
|
|
9
|
+
// how broken the picture is, 0 to 1, and 1 during a black screen
|
|
10
|
+
uniform float severity;
|
|
11
|
+
uniform float blackout;
|
|
12
|
+
// the video frame number, for the random patterns
|
|
13
|
+
uniform float frame;
|
|
14
|
+
in vec2 v_textureCoordinates;
|
|
15
|
+
|
|
16
|
+
// a macroblock, in CSS pixels
|
|
17
|
+
const float BLOCK = 16.0;
|
|
18
|
+
|
|
19
|
+
void main() {
|
|
20
|
+
vec2 size = czm_viewport.zw;
|
|
21
|
+
vec2 pixel = gl_FragCoord.xy / czm_pixelRatio;
|
|
22
|
+
vec2 uv = v_textureCoordinates;
|
|
23
|
+
vec4 sceneColor = texture(colorTexture, uv);
|
|
24
|
+
// clean: slightly crushed blacks, a little more color
|
|
25
|
+
vec3 rgb = sceneColor.rgb;
|
|
26
|
+
rgb = czm_saturation(rgb, 1.1);
|
|
27
|
+
rgb = max(rgb - 0.02, 0.0) / 0.98;
|
|
28
|
+
|
|
29
|
+
if (severity > 0.0) {
|
|
30
|
+
// the pattern changes every few frames, as the decoder stutters
|
|
31
|
+
float pattern = floor(frame / 3.0);
|
|
32
|
+
// strips shifted sideways
|
|
33
|
+
float strip = floor(pixel.y / (BLOCK * 2.0));
|
|
34
|
+
if (hash(vec2(strip, pattern + 7.0)) < 0.25 * severity) {
|
|
35
|
+
uv.x += (hash(vec2(strip, pattern + 11.0)) - 0.5) * 0.2 * severity;
|
|
36
|
+
}
|
|
37
|
+
// macroblocks: more of them as the signal gets worse; some show the picture displaced
|
|
38
|
+
vec2 block = floor(uv * size / czm_pixelRatio / BLOCK);
|
|
39
|
+
if (hash(block + pattern * 0.37) < 1.2 * severity) {
|
|
40
|
+
vec2 displaced = hash(block + pattern + 3.0) < 0.3
|
|
41
|
+
? floor((vec2(hash(block + 5.0), hash(block + 9.0)) - 0.5) * 4.0)
|
|
42
|
+
: vec2(0.0);
|
|
43
|
+
vec2 cell = BLOCK * czm_pixelRatio / size;
|
|
44
|
+
vec2 origin = (block + displaced) * cell;
|
|
45
|
+
// the block's corners, and a gradient between them
|
|
46
|
+
vec2 inset = 0.5 / size;
|
|
47
|
+
vec3 c00 = texture(colorTexture, origin + inset).rgb;
|
|
48
|
+
vec3 c10 = texture(colorTexture, origin + vec2(cell.x - inset.x, inset.y)).rgb;
|
|
49
|
+
vec3 c01 = texture(colorTexture, origin + vec2(inset.x, cell.y - inset.y)).rgb;
|
|
50
|
+
vec3 c11 = texture(colorTexture, origin + cell - inset).rgb;
|
|
51
|
+
vec2 f = fract(uv * size / czm_pixelRatio / BLOCK);
|
|
52
|
+
rgb = mix(mix(c00, c10, f.x), mix(c01, c11, f.x), f.y);
|
|
53
|
+
// fewer colors
|
|
54
|
+
float levels = mix(24.0, 6.0, severity);
|
|
55
|
+
rgb = floor(rgb * levels + 0.5) / levels;
|
|
56
|
+
} else if (uv != v_textureCoordinates) {
|
|
57
|
+
rgb = texture(colorTexture, uv).rgb;
|
|
58
|
+
}
|
|
59
|
+
// the color channels split sideways
|
|
60
|
+
vec2 split = vec2(3.0 * severity * czm_pixelRatio / size.x, 0.0);
|
|
61
|
+
rgb.r = mix(rgb.r, texture(colorTexture, uv + split).r, severity);
|
|
62
|
+
rgb.b = mix(rgb.b, texture(colorTexture, uv - split).b, severity);
|
|
63
|
+
}
|
|
64
|
+
out_FragColor = vec4(rgb * (1.0 - blackout), sceneColor.a);
|
|
65
|
+
}
|