@geoblocks/cesium-post-process 0.4.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/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/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/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/{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/{local-frame.js → src/local-frame.js} +0 -0
- /package/{motion-blur.js → src/motion-blur.js} +0 -0
- /package/{precipitation.js → src/precipitation.js} +0 -0
- /package/{rain-rings.js → src/rain-rings.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}/SnowLine.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/{snow-line.js → src/snow-line.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,49 @@
|
|
|
1
|
+
// The haze lit by the searchlight's beam, at a fraction of the resolution, as in Killzone Shadow
|
|
2
|
+
// Fall's volumetrics (Valient, SIGGRAPH 2014): r is the light scattered along the view ray, g the
|
|
3
|
+
// log2 of the scene distance for SpotlightBeamBlur.glsl and the upsampling: half floats hold it, and
|
|
4
|
+
// distances compare as ratios. Needs EyeFromDepth, Hash, Noise, SpotlightCone and Beam.
|
|
5
|
+
// brightness of the beam in the air, 0 to 1
|
|
6
|
+
uniform float beam;
|
|
7
|
+
// Henyey-Greenstein asymmetry of the haze, 0 to 1: it scatters mostly forward, so the beam is
|
|
8
|
+
// brighter when looking toward the light
|
|
9
|
+
uniform float beamAnisotropy;
|
|
10
|
+
in vec2 v_textureCoordinates;
|
|
11
|
+
|
|
12
|
+
// radius of the beam's bright core around the light, in heights: the inverse square is softened
|
|
13
|
+
// within it, as the pool's is capped, so that the top of the beam does not burn out
|
|
14
|
+
const float BEAM_CORE = 0.25;
|
|
15
|
+
// brightness of the lit haze, over the height so that it keeps with the radius, matched to the
|
|
16
|
+
// searchlight's former analytic beam at the default anisotropy
|
|
17
|
+
const float BEAM_DENSITY = 19.0;
|
|
18
|
+
// contrast and density of the dust streaks in the beam, across its width
|
|
19
|
+
const float STREAKS = 0.2;
|
|
20
|
+
const float STREAK_SCALE = 4.0;
|
|
21
|
+
|
|
22
|
+
void main() {
|
|
23
|
+
vec4 eye = eyeAt(depthTexture, v_textureCoordinates);
|
|
24
|
+
// eye.w is 0 for the sky, where the view ray goes on
|
|
25
|
+
float sceneDistance = eye.w == 0.0 ? 1e30 : length(eye.xyz);
|
|
26
|
+
Cone spot;
|
|
27
|
+
if (beam <= 0.0 || !spotlightCone(spot)) {
|
|
28
|
+
out_FragColor = vec4(0.0, log2(sceneDistance), 0.0, 1.0);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
Beam cone;
|
|
32
|
+
cone.apex = spot.light;
|
|
33
|
+
cone.forward = -up;
|
|
34
|
+
cone.edgeCos = spot.coneCos;
|
|
35
|
+
cone.coreCos = spot.penumbraCos;
|
|
36
|
+
cone.hotCore = 0.0;
|
|
37
|
+
cone.light = spot.light;
|
|
38
|
+
cone.reference = spot.height;
|
|
39
|
+
cone.core = BEAM_CORE * spot.height;
|
|
40
|
+
cone.reach = 1e30;
|
|
41
|
+
cone.extinction = 0.0;
|
|
42
|
+
cone.anisotropy = beamAnisotropy;
|
|
43
|
+
cone.spacing = 1.0;
|
|
44
|
+
cone.nearFade = vec2(0.0);
|
|
45
|
+
cone.dust = STREAKS;
|
|
46
|
+
cone.dustScale = STREAK_SCALE;
|
|
47
|
+
float scattered = BEAM_DENSITY / spot.height * beamAlong(normalize(eye.xyz), sceneDistance, cone);
|
|
48
|
+
out_FragColor = vec4(scattered, log2(sceneDistance), 0.0, 1.0);
|
|
49
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// The beam's haze, blurred over the neighboring texels at its own resolution, each weighted by how
|
|
2
|
+
// close its scene distance is to the texel's: the dither of the samples along the rays smooths
|
|
3
|
+
// out, but the haze in front of a ridge does not spill onto the ridge.
|
|
4
|
+
precision highp sampler2D;
|
|
5
|
+
uniform sampler2D beamTexture;
|
|
6
|
+
in vec2 v_textureCoordinates;
|
|
7
|
+
|
|
8
|
+
// difference of the log2 of the distances at which a neighbor no longer counts, about 10 %
|
|
9
|
+
const float SOFT_DEPTH = 0.14;
|
|
10
|
+
|
|
11
|
+
void main() {
|
|
12
|
+
// czm_viewport is this pass's texture, the size of the beam's
|
|
13
|
+
vec2 texel = 1.0 / czm_viewport.zw;
|
|
14
|
+
float centerDepth = texture(beamTexture, v_textureCoordinates).g;
|
|
15
|
+
float sum = 0.0;
|
|
16
|
+
float total = 0.0;
|
|
17
|
+
for (int y = -1; y <= 1; y++) {
|
|
18
|
+
for (int x = -1; x <= 1; x++) {
|
|
19
|
+
vec2 sample_ = texture(beamTexture, v_textureCoordinates + vec2(float(x), float(y)) * texel).rg;
|
|
20
|
+
float gap = abs(sample_.g - centerDepth);
|
|
21
|
+
float weight = (x == 0 ? 2.0 : 1.0) * (y == 0 ? 2.0 : 1.0) * clamp(1.0 - gap / SOFT_DEPTH, 0.0, 1.0);
|
|
22
|
+
sum += weight * sample_.r;
|
|
23
|
+
total += weight;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
out_FragColor = vec4(sum / total, centerDepth, 0.0, 1.0);
|
|
27
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// The searchlight's cone, for its beam and for its pool of light: the light hangs above the focus,
|
|
2
|
+
// pointing down. Needs EyeFromDepth.
|
|
3
|
+
precision highp sampler2D;
|
|
4
|
+
uniform sampler2D depthTexture;
|
|
5
|
+
// in eye coordinates; w is 0 for what is in the middle of the screen
|
|
6
|
+
uniform vec4 focus;
|
|
7
|
+
// local up direction, in eye coordinates
|
|
8
|
+
uniform vec3 up;
|
|
9
|
+
// meters
|
|
10
|
+
uniform float radius;
|
|
11
|
+
// width of the penumbra, as a fraction of the radius
|
|
12
|
+
uniform float softness;
|
|
13
|
+
|
|
14
|
+
// height of the light above the focus, in radii: a cone of 53 degrees
|
|
15
|
+
const float HEIGHT = 2.0;
|
|
16
|
+
|
|
17
|
+
struct Cone {
|
|
18
|
+
vec3 light;
|
|
19
|
+
float height;
|
|
20
|
+
// cosines of the angles, from the light's axis, at which the pool ends and its penumbra starts
|
|
21
|
+
float coneCos;
|
|
22
|
+
float penumbraCos;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// false without a focus in front of the camera (the sky in the middle, a focus behind)
|
|
26
|
+
bool spotlightCone(out Cone cone) {
|
|
27
|
+
vec4 target = focus.w > 0.0 ? focus : eyeAt(depthTexture, vec2(0.5));
|
|
28
|
+
if (target.w == 0.0 || target.z >= 0.0) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
cone.height = HEIGHT * radius;
|
|
32
|
+
cone.light = target.xyz + cone.height * up;
|
|
33
|
+
float inner = radius * (1.0 - softness);
|
|
34
|
+
cone.coneCos = cone.height / sqrt(cone.height * cone.height + radius * radius);
|
|
35
|
+
cone.penumbraCos = cone.height / sqrt(cone.height * cone.height + inner * inner);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// A Super 8 home movie: faded warm colors, halation around the highlights, heavy grain, the frame
|
|
2
|
+
// drifting in the gate, flicker, light leaks, a strong vignette and the rounded corners of the
|
|
3
|
+
// camera gate.
|
|
4
|
+
precision highp sampler2D;
|
|
5
|
+
uniform sampler2D colorTexture;
|
|
6
|
+
// the scene blurred, for the halation
|
|
7
|
+
uniform sampler2D blurTexture;
|
|
8
|
+
// seconds
|
|
9
|
+
uniform float time;
|
|
10
|
+
// 0 to 1
|
|
11
|
+
uniform float fade;
|
|
12
|
+
uniform float grain;
|
|
13
|
+
// in CSS pixels
|
|
14
|
+
uniform float weave;
|
|
15
|
+
// 0 to 1
|
|
16
|
+
uniform float flicker;
|
|
17
|
+
uniform float lightLeaks;
|
|
18
|
+
uniform float halation;
|
|
19
|
+
// width over height of the visible frame, 0 for the whole canvas
|
|
20
|
+
uniform float aspectRatio;
|
|
21
|
+
in vec2 v_textureCoordinates;
|
|
22
|
+
|
|
23
|
+
// Super 8 runs at 18 frames per second
|
|
24
|
+
const float FRAME_RATE = 18.0;
|
|
25
|
+
// radius of the rounded corners, as a fraction of the frame height
|
|
26
|
+
const float CORNER = 0.05;
|
|
27
|
+
const vec3 LEAK = vec3(1.0, 0.45, 0.15);
|
|
28
|
+
// size of the grain clumps, in CSS pixels, and how much they differ between the dye layers
|
|
29
|
+
const float GRAIN_SIZE = 2.0;
|
|
30
|
+
const float GRAIN_COLOR = 0.3;
|
|
31
|
+
// light scattered back through the film base is red-orange
|
|
32
|
+
const vec3 HALATION = vec3(1.0, 0.35, 0.15);
|
|
33
|
+
|
|
34
|
+
float hash(float n) {
|
|
35
|
+
return fract(sin(n) * 43758.5453);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// smooth noise in [0, 1) over time
|
|
39
|
+
float noise(float t) {
|
|
40
|
+
float i = floor(t);
|
|
41
|
+
float f = fract(t);
|
|
42
|
+
return mix(hash(i), hash(i + 1.0), f * f * (3.0 - 2.0 * f));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
void main() {
|
|
46
|
+
vec2 size = czm_viewport.zw;
|
|
47
|
+
// the time of the film frame, and its number for the noise
|
|
48
|
+
float t = floor(time * FRAME_RATE) / FRAME_RATE;
|
|
49
|
+
float frame = mod(floor(time * FRAME_RATE), 1000.0);
|
|
50
|
+
|
|
51
|
+
// gate weave: the whole picture drifts by a pixel or two, from frame to frame
|
|
52
|
+
vec2 drift = vec2(noise(t * 3.0), noise(t * 3.0 + 17.0)) * 2.0 - 1.0;
|
|
53
|
+
vec2 uv = v_textureCoordinates + weave * czm_pixelRatio * drift / size;
|
|
54
|
+
|
|
55
|
+
// the gate, with rounded corners, in pixels
|
|
56
|
+
vec2 frameHalf = 0.5 * frameSize(aspectRatio) * size;
|
|
57
|
+
float radius = CORNER * 2.0 * frameHalf.y;
|
|
58
|
+
vec2 q = abs((v_textureCoordinates - 0.5) * size) - frameHalf + radius;
|
|
59
|
+
float outside = length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - radius;
|
|
60
|
+
float gate = 1.0 - smoothstep(-czm_pixelRatio, czm_pixelRatio, outside);
|
|
61
|
+
// -0.5 to 0.5 inside the frame
|
|
62
|
+
vec2 inFrame = (v_textureCoordinates - 0.5) * size / (2.0 * frameHalf);
|
|
63
|
+
|
|
64
|
+
vec3 color = texture(colorTexture, uv).rgb;
|
|
65
|
+
// faded film: less saturation, lifted blacks, a warm cast
|
|
66
|
+
color = mix(color, vec3(czm_luminance(color)), 0.4 * fade);
|
|
67
|
+
color = mix(color, color * vec3(1.05, 0.95, 0.78) * 0.88 + vec3(0.09, 0.07, 0.05), fade);
|
|
68
|
+
// halation: a warm glow bleeding around the highlights
|
|
69
|
+
float glow = smoothstep(0.45, 0.9, czm_luminance(texture(blurTexture, uv).rgb));
|
|
70
|
+
color = 1.0 - (1.0 - color) * (1.0 - halation * glow * HALATION);
|
|
71
|
+
// vignette
|
|
72
|
+
color *= 1.0 - 0.6 * smoothstep(0.35, 0.85, length(inFrame));
|
|
73
|
+
// a warm light leak, drifting along the right edge and coming and going
|
|
74
|
+
vec2 leakAt = vec2(0.6, noise(time * 0.15) - 0.5);
|
|
75
|
+
float leak = lightLeaks * smoothstep(0.3, 0.9, noise(time * 0.3 + 5.0)) * exp(-6.0 * dot(inFrame - leakAt, inFrame - leakAt));
|
|
76
|
+
color = 1.0 - (1.0 - color) * (1.0 - leak * LEAK);
|
|
77
|
+
// flicker: the brightness changes from frame to frame
|
|
78
|
+
color *= 1.0 + flicker * (2.0 * hash(frame) - 1.0);
|
|
79
|
+
// grain: clumps a few pixels wide, a new pattern with each film frame, a little different in
|
|
80
|
+
// each dye layer, heaviest in the shadows and midtones and fading out in the highlights
|
|
81
|
+
vec2 grainAt = gl_FragCoord.xy / (GRAIN_SIZE * czm_pixelRatio);
|
|
82
|
+
float z = frame * 1.7 + 0.5;
|
|
83
|
+
float mono = gradientNoise(grainAt, z);
|
|
84
|
+
vec3 layers = vec3(gradientNoise(grainAt, z + 101.0), gradientNoise(grainAt, z + 211.0), gradientNoise(grainAt, z + 307.0));
|
|
85
|
+
vec3 noise = mix(vec3(mono), layers, GRAIN_COLOR);
|
|
86
|
+
float y = clamp(czm_luminance(color), 0.0, 1.0);
|
|
87
|
+
color += grain * 1.4 * noise * 2.0 * (1.0 - y) * (0.5 + y);
|
|
88
|
+
|
|
89
|
+
out_FragColor = vec4(clamp(color, 0.0, 1.0) * gate, 1.0);
|
|
90
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Three-strip Technicolor: the camera split the scene into red, green and blue records, each
|
|
2
|
+
// printed with its complementary dye, the three dyes over each other. Each color gains its purity,
|
|
3
|
+
// what it has over the other two, and loses some of theirs: grays stay, primaries deepen. After
|
|
4
|
+
// prod80's ReShade Technicolor (MIT), https://github.com/prod80/prod80-ReShade-Repository
|
|
5
|
+
precision highp sampler2D;
|
|
6
|
+
uniform sampler2D colorTexture;
|
|
7
|
+
// 0 to 1
|
|
8
|
+
uniform float strength;
|
|
9
|
+
// width over height of the visible frame, 0 for the whole canvas
|
|
10
|
+
uniform float aspectRatio;
|
|
11
|
+
in vec2 v_textureCoordinates;
|
|
12
|
+
|
|
13
|
+
// how much of the other colors' purity each color loses
|
|
14
|
+
const float COLOR_STRENGTH = 0.2;
|
|
15
|
+
|
|
16
|
+
void main() {
|
|
17
|
+
vec2 inFrame = (v_textureCoordinates - 0.5) / frameSize(aspectRatio);
|
|
18
|
+
if (max(abs(inFrame.x), abs(inFrame.y)) > 0.5) {
|
|
19
|
+
out_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
vec4 sceneColor = texture(colorTexture, v_textureCoordinates);
|
|
23
|
+
vec3 color = sceneColor.rgb;
|
|
24
|
+
// red: r (1 - g) (1 - b), and so on
|
|
25
|
+
vec3 negative = 1.0 - color;
|
|
26
|
+
vec3 purity = color * negative.grg * negative.bbr;
|
|
27
|
+
vec3 taken = COLOR_STRENGTH * purity;
|
|
28
|
+
vec3 printed = color + purity - taken.yxy - taken.zzx;
|
|
29
|
+
out_FragColor = vec4(clamp(mix(color, printed, strength), 0.0, 1.0), sceneColor.a);
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Tilt-shift: a narrow band of sharpness around the focal distance and the blurred image further
|
|
2
|
+
// off, with the punchy colors of miniature photographs. Distances compare as ratios, like a lens:
|
|
3
|
+
// sharp within range factors of two of the focal distance, fully blurred at twice that. An
|
|
4
|
+
// orthographic camera has no distance to compare: a band across the screen, as a miniature's fake,
|
|
5
|
+
// sharp within range of the view's height above and below the focus, whatever stands there.
|
|
6
|
+
precision highp sampler2D;
|
|
7
|
+
uniform sampler2D colorTexture;
|
|
8
|
+
uniform sampler2D blurTexture;
|
|
9
|
+
uniform sampler2D depthTexture;
|
|
10
|
+
// in eye coordinates; w is 0 for what is in the middle of the screen
|
|
11
|
+
uniform vec4 focus;
|
|
12
|
+
// in factors of two of the focal distance, or shares of the view's height (orthographic)
|
|
13
|
+
uniform float range;
|
|
14
|
+
// 0 to 1
|
|
15
|
+
uniform float saturation;
|
|
16
|
+
in vec2 v_textureCoordinates;
|
|
17
|
+
|
|
18
|
+
void main() {
|
|
19
|
+
vec4 target = focus.w > 0.0 ? focus : eyeAt(depthTexture, vec2(0.5));
|
|
20
|
+
vec4 eye = eyeAt(depthTexture, v_textureCoordinates);
|
|
21
|
+
float fromCamera = eye.w == 0.0 ? 1e30 : length(eye.xyz);
|
|
22
|
+
// the orthographic view's height: its projection's y scale is 2 over it
|
|
23
|
+
float off = czm_orthographicIn3D == 1.0
|
|
24
|
+
? abs(eye.y - target.y) * czm_projection[1][1] / 2.0
|
|
25
|
+
: abs(log2(fromCamera / length(target.xyz)));
|
|
26
|
+
// no blur without a focus in front of the camera (the sky in the middle, a focus behind)
|
|
27
|
+
float blur = target.w > 0.0 && target.z < 0.0 ? smoothstep(range, 2.0 * range, off) : 0.0;
|
|
28
|
+
vec4 sceneColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), blur);
|
|
29
|
+
|
|
30
|
+
vec3 color = sceneColor.rgb;
|
|
31
|
+
color = czm_saturation(color, 1.0 + saturation);
|
|
32
|
+
color = mix(color, smoothstep(0.0, 1.0, color), saturation);
|
|
33
|
+
out_FragColor = vec4(clamp(color, 0.0, 1.0), sceneColor.a);
|
|
34
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// A toy's look, as an isometric game's, after DepthEdges: the edges lit where the surface bends
|
|
2
|
+
// outward and shaded where it bends inward, rounded as molded plastic close up; an outline along
|
|
3
|
+
// the jumps, on their near side, a darker shade of the color; the colors a little richer and
|
|
4
|
+
// warmer; the sky, if asked, a soft 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 colorTexture;
|
|
8
|
+
// how much brighter a convex edge gets, how much darker a concave one
|
|
9
|
+
uniform float light;
|
|
10
|
+
uniform float shade;
|
|
11
|
+
// the edges' bevel, in meters, a pixel at the least; how much darker the outline, 0 for none
|
|
12
|
+
uniform float bevel;
|
|
13
|
+
uniform float outline;
|
|
14
|
+
// the colors' saturation, and a factor each of red, green and blue
|
|
15
|
+
uniform float saturation;
|
|
16
|
+
uniform vec3 warm;
|
|
17
|
+
// the sky's gradient, from the top of the screen to its bottom; w 0 to keep the sky
|
|
18
|
+
uniform vec4 skyTop;
|
|
19
|
+
uniform vec4 skyBottom;
|
|
20
|
+
in vec2 v_textureCoordinates;
|
|
21
|
+
|
|
22
|
+
void main() {
|
|
23
|
+
vec2 uv = v_textureCoordinates;
|
|
24
|
+
vec4 sceneColor = texture(colorTexture, uv);
|
|
25
|
+
float c = depthAt(uv);
|
|
26
|
+
if (c == SKY) {
|
|
27
|
+
out_FragColor = skyTop.w > 0.0 ? vec4(skyAt(uv, skyTop, skyBottom), 1.0) : sceneColor;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
float pixel = pixelAt(c);
|
|
31
|
+
// the neighbors a bevel's width away: the bend measured over it, strongest on the edge and fading
|
|
32
|
+
// to nothing a bevel off, a rounded edge's highlight
|
|
33
|
+
float steps = clamp(bevel / pixel, 1.0, BEVEL);
|
|
34
|
+
vec3 color = sceneColor.rgb;
|
|
35
|
+
// the creases' neighbours read only when they light or shade: a scene drawing its own edges asks for neither
|
|
36
|
+
if (light != 0.0 || shade != 0.0) {
|
|
37
|
+
vec4 n = neighborsAt(uv, c, steps);
|
|
38
|
+
float crease = creaseOf(n, steps * pixel, pixel);
|
|
39
|
+
color *= n.x + n.y + n.z + n.w > 0.0 ? 1.0 + light * crease : 1.0 - shade * crease;
|
|
40
|
+
}
|
|
41
|
+
if (outline > 0.0) {
|
|
42
|
+
color *= 1.0 - outline * outlineAt(uv, c, vec4(0.0), steps, pixel);
|
|
43
|
+
}
|
|
44
|
+
color = czm_saturation(color, saturation) * warm;
|
|
45
|
+
out_FragColor = vec4(clamp(color, 0.0, 1.0), sceneColor.a);
|
|
46
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Fog filling the valleys below an altitude: the fog along the ray from the camera to the pixel
|
|
2
|
+
// is the part of the ray below the top, the density thinning over a soft band under the top. Needs
|
|
3
|
+
// EyeFromDepth, Height and Fog.
|
|
4
|
+
precision highp sampler2D;
|
|
5
|
+
uniform sampler2D colorTexture;
|
|
6
|
+
uniform sampler2D depthTexture;
|
|
7
|
+
// meters above the ellipsoid
|
|
8
|
+
uniform float top;
|
|
9
|
+
// per meter
|
|
10
|
+
uniform float density;
|
|
11
|
+
// meters
|
|
12
|
+
uniform float softness;
|
|
13
|
+
uniform vec4 color;
|
|
14
|
+
in vec2 v_textureCoordinates;
|
|
15
|
+
|
|
16
|
+
// the integral of clamp(x, 0, 1)
|
|
17
|
+
float ramp(float x) {
|
|
18
|
+
return x <= 0.0 ? 0.0 : x < 1.0 ? 0.5 * x * x : x - 0.5;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// mean fraction of the density along a straight ray from height h0 to h1
|
|
22
|
+
float fogFraction(float h0, float h1) {
|
|
23
|
+
float band = max(softness, 1e-3);
|
|
24
|
+
if (abs(h1 - h0) < 1e-2) {
|
|
25
|
+
return clamp((top - h0) / band, 0.0, 1.0);
|
|
26
|
+
}
|
|
27
|
+
return band * (ramp((top - h0) / band) - ramp((top - h1) / band)) / (h1 - h0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
void main() {
|
|
31
|
+
vec4 sceneColor = texture(colorTexture, v_textureCoordinates);
|
|
32
|
+
vec4 eye = eyeAt(depthTexture, v_textureCoordinates);
|
|
33
|
+
// the sky is a direction
|
|
34
|
+
vec3 end = eye.w == 0.0 ? eye.xyz * SKY_DISTANCE : eye.xyz;
|
|
35
|
+
float amount = 1.0 - exp(-density * length(end) * fogFraction(cameraHeight, heightAt(end)));
|
|
36
|
+
// lit by the sun, as Cesium's fog: the fog color during the day, turning around sunset to a
|
|
37
|
+
// moonlit blue as bright as the scene's fog.minimumBrightness, rather than a flat gray
|
|
38
|
+
vec3 fogColor = byDaylight(color.rgb, daylight());
|
|
39
|
+
out_FragColor = vec4(mix(sceneColor.rgb, fogColor, amount * color.a), sceneColor.a);
|
|
40
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Where it rains: the map of the local intensity, 0 to 1 in its red channel, over a rectangle of
|
|
2
|
+
// longitudes and latitudes, sampled bilinearly, which fades the rain in over a cell at its edges.
|
|
3
|
+
// Without a map, a pixel over the whole globe: rain everywhere for Precipitation, none for Clouds.
|
|
4
|
+
// A next map over the same rectangle crossfades from it by the blend, as the radar from one hour to
|
|
5
|
+
// the next; without one, the map again.
|
|
6
|
+
precision highp sampler2D;
|
|
7
|
+
uniform sampler2D map;
|
|
8
|
+
uniform sampler2D nextMap;
|
|
9
|
+
uniform float mapBlend;
|
|
10
|
+
// the rectangle in the ellipsoid's texture coordinates: its west and south, and one over its width
|
|
11
|
+
// and height
|
|
12
|
+
uniform vec4 mapBounds;
|
|
13
|
+
|
|
14
|
+
// a point in world coordinates on the map, 0 to 1 over its rectangle: single precision rounds it to
|
|
15
|
+
// about half a meter, nothing at the scale of a map
|
|
16
|
+
vec2 mapUv(vec3 positionWC) {
|
|
17
|
+
vec3 normal = normalize(positionWC * czm_ellipsoidInverseRadii * czm_ellipsoidInverseRadii);
|
|
18
|
+
return (czm_ellipsoidTextureCoordinates(normal) - mapBounds.xy) * mapBounds.zw;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// the map's texel at a point in world coordinates, all its channels, 0 outside the map
|
|
22
|
+
vec4 mapTexelAt(vec3 positionWC) {
|
|
23
|
+
vec2 uv = mapUv(positionWC);
|
|
24
|
+
if (any(lessThan(uv, vec2(0.0))) || any(greaterThan(uv, vec2(1.0)))) {
|
|
25
|
+
return vec4(0.0);
|
|
26
|
+
}
|
|
27
|
+
return mix(texture(map, uv), texture(nextMap, uv), mapBlend);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// the local intensity at a point in world coordinates, 0 outside the map
|
|
31
|
+
float mapAt(vec3 positionWC) {
|
|
32
|
+
return mapTexelAt(positionWC).r;
|
|
33
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// A white model's look, as an architect's plaster model or clay render, after DepthEdges: every
|
|
2
|
+
// color turned to its value and the values pressed into a narrow range of whites (an accent's hue
|
|
3
|
+
// kept, if asked; the darkest left black, a section's poché), so the light and the shapes alone
|
|
4
|
+
// tell the surfaces apart; darker where surfaces meet, an ambient obscurance from the depth; the
|
|
5
|
+
// creases lit and shaded, a fine outline along the jumps; the sky, if asked, a pale gradient.
|
|
6
|
+
// its samplers read in high precision, whatever comes before (a phone's GPU's default is low)
|
|
7
|
+
precision highp sampler2D;
|
|
8
|
+
uniform sampler2D colorTexture;
|
|
9
|
+
// how much brighter a convex edge gets, how much darker a concave one
|
|
10
|
+
uniform float light;
|
|
11
|
+
uniform float shade;
|
|
12
|
+
// the edges' bevel, in meters, a pixel at the least; how much darker the outline, 0 for none
|
|
13
|
+
uniform float bevel;
|
|
14
|
+
uniform float outline;
|
|
15
|
+
// the colors' saturation, 0 for white, and a factor each of red, green and blue: the plaster's tint
|
|
16
|
+
uniform float saturation;
|
|
17
|
+
uniform vec3 warm;
|
|
18
|
+
// the darkest and the lightest values, the scene's black and white; the value under which a color
|
|
19
|
+
// keeps it, 0 for none
|
|
20
|
+
uniform vec2 values;
|
|
21
|
+
uniform float poche;
|
|
22
|
+
// how much darker a corner gets, and how wide its shadow is, in meters
|
|
23
|
+
uniform float occlusion;
|
|
24
|
+
uniform float radius;
|
|
25
|
+
// the sky's gradient, from the top of the screen to its bottom; w 0 to keep the sky
|
|
26
|
+
uniform vec4 skyTop;
|
|
27
|
+
uniform vec4 skyBottom;
|
|
28
|
+
in vec2 v_textureCoordinates;
|
|
29
|
+
|
|
30
|
+
// the darkest colors' values, under the poché's, kept as they are rather than pressed into the
|
|
31
|
+
// whites, fading into them over these shares of it: an architect's poché, solid black, or a text's
|
|
32
|
+
const vec2 POCHE = vec2(0.6, 1.4);
|
|
33
|
+
// the occlusion: its widest, in pixels; its samples, on a spiral turned by the golden angle, the
|
|
34
|
+
// spiral itself turned from pixel to pixel; how steeply above the surface a sample rises to count
|
|
35
|
+
// (the normal from the depth is not exact), and how far from the pixel, in meters, a pixel and a
|
|
36
|
+
// half at the least (the depth's own steps on a flat wall not counted); how many pixels wide the
|
|
37
|
+
// disc is to show, fading in (zoomed out, its samples fall within the depth's noise)
|
|
38
|
+
const float RING = 48.0;
|
|
39
|
+
const int SAMPLES = 12;
|
|
40
|
+
const float GOLDEN = 2.39996;
|
|
41
|
+
const float BIAS = 0.15;
|
|
42
|
+
const float NEAREST = 0.05;
|
|
43
|
+
const vec2 SHOWN = vec2(3.0, 8.0);
|
|
44
|
+
|
|
45
|
+
// how much the surfaces around uv close in over it, from 0 to 1, as the Alchemy ambient obscurance
|
|
46
|
+
// (McGuire et al. 2011): the share of the samples around it, in a disc of the radius, that rise
|
|
47
|
+
// above its surface (its normal from the depth's slopes), each the more as it rises steeper, none
|
|
48
|
+
// farther than the radius; a corner's foot about a half, a flat floor none. p its eye coordinates, n
|
|
49
|
+
// their slopes' normal
|
|
50
|
+
float occludedAt(vec2 uv, vec3 p, vec3 n, float pixel) {
|
|
51
|
+
float reach = min(radius, RING * pixel);
|
|
52
|
+
float shown = smoothstep(SHOWN.x, SHOWN.y, reach / pixel);
|
|
53
|
+
if (shown == 0.0) {
|
|
54
|
+
return 0.0;
|
|
55
|
+
}
|
|
56
|
+
// turned toward the eye
|
|
57
|
+
vec3 eye = czm_orthographicIn3D == 1.0 ? vec3(0.0, 0.0, 1.0) : normalize(-p);
|
|
58
|
+
n = dot(n, eye) < 0.0 ? -n : n;
|
|
59
|
+
float nearest = max(NEAREST, 1.5 * pixel);
|
|
60
|
+
float spin = 6.2832 * fract(52.9829189 * fract(dot(gl_FragCoord.xy, vec2(0.06711056, 0.00583715))));
|
|
61
|
+
float sum = 0.0;
|
|
62
|
+
for (int i = 0; i < SAMPLES; i++) {
|
|
63
|
+
float a = float(i) * GOLDEN + spin;
|
|
64
|
+
vec2 o = vec2(cos(a), sin(a)) * (float(i) + 0.5) / float(SAMPLES) * reach / pixel / czm_viewport.zw;
|
|
65
|
+
vec4 q = eyeAt(depthTexture, uv + o);
|
|
66
|
+
vec3 v = q.xyz - p;
|
|
67
|
+
float d = length(v);
|
|
68
|
+
if (q.w > 0.0 && d > nearest) {
|
|
69
|
+
sum += max(0.0, dot(v / d, n) - BIAS) * (1.0 - smoothstep(0.5 * reach, reach, d));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return shown * sum / float(SAMPLES);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
void main() {
|
|
76
|
+
vec2 uv = v_textureCoordinates;
|
|
77
|
+
// the surface's normal from the depth's slopes, read before any pixel returns, in step with its
|
|
78
|
+
// neighbors
|
|
79
|
+
vec3 p = eyeAt(depthTexture, uv).xyz;
|
|
80
|
+
vec3 normal = normalize(cross(dFdx(p), dFdy(p)));
|
|
81
|
+
vec4 sceneColor = texture(colorTexture, uv);
|
|
82
|
+
float c = depthAt(uv);
|
|
83
|
+
if (c == SKY) {
|
|
84
|
+
out_FragColor = skyTop.w > 0.0 ? vec4(skyAt(uv, skyTop, skyBottom), 1.0) : sceneColor;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
float pixel = pixelAt(c);
|
|
88
|
+
// the color's value pressed between the darkest and the lightest, but the darkest's; its hue as
|
|
89
|
+
// saturated as asked, scaled down rather than clipped where a channel would pass 1
|
|
90
|
+
float value = czm_luminance(sceneColor.rgb);
|
|
91
|
+
float kept = poche > 0.0 ? 1.0 - smoothstep(POCHE.x * poche, POCHE.y * poche, value) : 0.0;
|
|
92
|
+
float pressed = mix(mix(values.x, values.y, value), value, kept);
|
|
93
|
+
vec3 hue = sceneColor.rgb * pressed / max(value, 1e-4);
|
|
94
|
+
vec3 color = mix(vec3(pressed), hue / max(1.0, max(hue.r, max(hue.g, hue.b))), saturation);
|
|
95
|
+
float steps = clamp(bevel / pixel, 1.0, BEVEL);
|
|
96
|
+
if (light != 0.0 || shade != 0.0) {
|
|
97
|
+
vec4 n = neighborsAt(uv, c, steps);
|
|
98
|
+
float crease = creaseOf(n, steps * pixel, pixel);
|
|
99
|
+
color *= n.x + n.y + n.z + n.w > 0.0 ? 1.0 + light * crease : 1.0 - shade * crease;
|
|
100
|
+
}
|
|
101
|
+
if (occlusion > 0.0) {
|
|
102
|
+
color *= 1.0 - occlusion * occludedAt(uv, p, normal, pixel);
|
|
103
|
+
}
|
|
104
|
+
if (outline > 0.0) {
|
|
105
|
+
color *= 1.0 - outline * outlineAt(uv, c, vec4(0.0), steps, pixel);
|
|
106
|
+
}
|
|
107
|
+
out_FragColor = vec4(clamp(color * warm, 0.0, 1.0), sceneColor.a);
|
|
108
|
+
}
|
|
File without changes
|
/package/{blur.js → src/blur.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|