├── .esdoc.json ├── .gitattributes ├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── pull_request_template.md └── workflows │ ├── cd.yml │ └── ci.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── demo ├── README.md ├── src │ ├── demos │ │ ├── AntialiasingDemo.js │ │ ├── BloomDemo.js │ │ ├── BlurDemo.js │ │ ├── ColorDepthDemo.js │ │ ├── ColorGradingDemo.js │ │ ├── DepthOfFieldDemo.js │ │ ├── GlitchDemo.js │ │ ├── GodRaysDemo.js │ │ ├── OutlineDemo.js │ │ ├── PatternDemo.js │ │ ├── PerformanceDemo.js │ │ ├── PixelationDemo.js │ │ ├── PostProcessingDemo.js │ │ ├── SSAODemo.js │ │ ├── ShockWaveDemo.js │ │ ├── TextureDemo.js │ │ ├── ToneMappingDemo.js │ │ └── objects │ │ │ ├── Cage.js │ │ │ ├── ObjectCloud.js │ │ │ ├── RiggedSimple.js │ │ │ └── Sponza.js │ ├── index.js │ └── utils │ │ ├── ProgressManager.js │ │ └── TextureUtils.js └── static │ ├── code.svg │ ├── github.svg │ ├── index.html │ ├── info.svg │ ├── models │ ├── rigged-simple │ │ ├── README.md │ │ ├── RiggedSimple.gltf │ │ └── RiggedSimple0.bin │ └── sponza │ │ ├── 10381718147657362067.jpg │ │ ├── 10388182081421875623.jpg │ │ ├── 11474523244911310074.jpg │ │ ├── 11490520546946913238.jpg │ │ ├── 11872827283454512094.jpg │ │ ├── 11968150294050148237.jpg │ │ ├── 1219024358953944284.jpg │ │ ├── 12501374198249454378.jpg │ │ ├── 13196865903111448057.jpg │ │ ├── 13824894030729245199.jpg │ │ ├── 13982482287905699490.jpg │ │ ├── 14118779221266351425.jpg │ │ ├── 14170708867020035030.jpg │ │ ├── 14267839433702832875.jpg │ │ ├── 14650633544276105767.jpg │ │ ├── 15295713303328085182.jpg │ │ ├── 15722799267630235092.jpg │ │ ├── 16275776544635328252.png │ │ ├── 16299174074766089871.jpg │ │ ├── 16885566240357350108.jpg │ │ ├── 17556969131407844942.jpg │ │ ├── 17876391417123941155.jpg │ │ ├── 2051777328469649772.jpg │ │ ├── 2185409758123873465.jpg │ │ ├── 2299742237651021498.jpg │ │ ├── 2374361008830720677.jpg │ │ ├── 2411100444841994089.jpg │ │ ├── 2775690330959970771.jpg │ │ ├── 2969916736137545357.jpg │ │ ├── 332936164838540657.jpg │ │ ├── 3371964815757888145.jpg │ │ ├── 3455394979645218238.jpg │ │ ├── 3628158980083700836.jpg │ │ ├── 3827035219084910048.jpg │ │ ├── 4477655471536070370.jpg │ │ ├── 4601176305987539675.jpg │ │ ├── 466164707995436622.jpg │ │ ├── 4675343432951571524.jpg │ │ ├── 4871783166746854860.jpg │ │ ├── 4910669866631290573.jpg │ │ ├── 4975155472559461469.jpg │ │ ├── 5061699253647017043.png │ │ ├── 5792855332885324923.jpg │ │ ├── 5823059166183034438.jpg │ │ ├── 6047387724914829168.jpg │ │ ├── 6151467286084645207.jpg │ │ ├── 6593109234861095314.jpg │ │ ├── 6667038893015345571.jpg │ │ ├── 6772804448157695701.jpg │ │ ├── 7056944414013900257.jpg │ │ ├── 715093869573992647.jpg │ │ ├── 7268504077753552595.jpg │ │ ├── 7441062115984513793.jpg │ │ ├── 755318871556304029.jpg │ │ ├── 759203620573749278.jpg │ │ ├── 7645212358685992005.jpg │ │ ├── 7815564343179553343.jpg │ │ ├── 8006627369776289000.png │ │ ├── 8051790464816141987.jpg │ │ ├── 8114461559286000061.jpg │ │ ├── 8481240838833932244.jpg │ │ ├── 8503262930880235456.jpg │ │ ├── 8747919177698443163.jpg │ │ ├── 8750083169368950601.jpg │ │ ├── 8773302468495022225.jpg │ │ ├── 8783994986360286082.jpg │ │ ├── 9288698199695299068.jpg │ │ ├── 9916269861720640319.jpg │ │ ├── README.md │ │ ├── Sponza.bin │ │ ├── Sponza.gltf │ │ └── white.png │ ├── styles.css │ └── textures │ ├── lut │ ├── 3dl │ │ └── presetpro-cinematic.3dl │ ├── cube │ │ ├── django-25.cube │ │ └── presetpro-cinematic.cube │ └── png │ │ ├── bleach-bypass.png │ │ ├── candle-light.png │ │ ├── cool-contrast.png │ │ ├── desaturated-fog.png │ │ ├── evening.png │ │ ├── fall.png │ │ ├── filmic1.png │ │ ├── filmic2.png │ │ ├── matrix-green.png │ │ ├── strong-amber.png │ │ └── warm-contrast.png │ ├── pattern.png │ ├── perturb.jpg │ ├── scratches.jpg │ └── skies │ ├── space-dark │ ├── nx.jpg │ ├── ny.jpg │ ├── nz.jpg │ ├── px.jpg │ ├── py.jpg │ └── pz.jpg │ ├── space-green │ ├── nx.jpg │ ├── ny.jpg │ ├── nz.jpg │ ├── px.jpg │ ├── py.jpg │ └── pz.jpg │ └── sunset │ ├── nx.png │ ├── ny.png │ ├── nz.png │ ├── px.png │ ├── py.png │ └── pz.png ├── esbuild.js ├── eslint.config.js ├── manual ├── .stylelintrc.json ├── README.md ├── assets │ ├── README.md │ ├── css │ │ ├── README.md │ │ └── src │ │ │ ├── _fonts.scss │ │ │ ├── _keyframes.scss │ │ │ ├── index.scss │ │ │ ├── screen │ │ │ ├── default │ │ │ │ ├── _index.scss │ │ │ │ ├── base │ │ │ │ │ ├── _anchor.scss │ │ │ │ │ ├── _body.scss │ │ │ │ │ ├── _button.scss │ │ │ │ │ ├── _canvas.scss │ │ │ │ │ ├── _code.scss │ │ │ │ │ ├── _figure.scss │ │ │ │ │ ├── _heading.scss │ │ │ │ │ ├── _list.scss │ │ │ │ │ └── _text.scss │ │ │ │ └── layout │ │ │ │ │ ├── _contents.scss │ │ │ │ │ ├── _footer.scss │ │ │ │ │ ├── _frame-content.scss │ │ │ │ │ ├── _header.scss │ │ │ │ │ ├── _highlight.scss │ │ │ │ │ ├── _main.scss │ │ │ │ │ ├── _nav.scss │ │ │ │ │ ├── _progress.scss │ │ │ │ │ ├── _sidebar.scss │ │ │ │ │ ├── _tweakpane.scss │ │ │ │ │ ├── _viewport.scss │ │ │ │ │ └── pages │ │ │ │ │ ├── _depth-of-field.scss │ │ │ │ │ ├── _fxaa.scss │ │ │ │ │ └── _smaa.scss │ │ │ ├── large │ │ │ │ ├── _index.scss │ │ │ │ ├── base │ │ │ │ │ └── _body.scss │ │ │ │ └── layout │ │ │ │ │ └── _main.scss │ │ │ ├── medium │ │ │ │ ├── _index.scss │ │ │ │ ├── base │ │ │ │ │ └── _body.scss │ │ │ │ └── layout │ │ │ │ │ ├── _main.scss │ │ │ │ │ ├── _sidebar.scss │ │ │ │ │ └── _tweakpane.scss │ │ │ └── small │ │ │ │ └── _index.scss │ │ │ ├── themes │ │ │ ├── _dark.scss │ │ │ ├── _default.scss │ │ │ ├── _highlight-dark.scss │ │ │ ├── _highlight-light.scss │ │ │ ├── _index.scss │ │ │ ├── _tweakpane-dark.scss │ │ │ └── _tweakpane-light.scss │ │ │ └── values │ │ │ ├── _breakpoints.scss │ │ │ ├── _colors-material.scss │ │ │ ├── _colors-metro.scss │ │ │ ├── _colors.scss │ │ │ ├── _dimensions.scss │ │ │ ├── _durations.scss │ │ │ └── _layers.scss │ └── js │ │ ├── README.md │ │ ├── libs │ │ └── vendor.js │ │ └── src │ │ ├── components │ │ ├── NavigationManager.js │ │ ├── SidebarManager.js │ │ ├── ThemeManager.js │ │ ├── ViewportManager.js │ │ └── index.js │ │ ├── demos │ │ ├── ascii.js │ │ ├── bloom.js │ │ ├── blur.js │ │ ├── brightness-contrast.js │ │ ├── chromatic-aberration.js │ │ ├── color-depth.js │ │ ├── depth-of-field.js │ │ ├── depth-picking.js │ │ ├── dot-screen.js │ │ ├── fxaa.js │ │ ├── glitch.js │ │ ├── god-rays.js │ │ ├── grid.js │ │ ├── hue-saturation.js │ │ ├── lut.js │ │ ├── msaa.js │ │ ├── outline.js │ │ ├── pixelation.js │ │ ├── scanlines.js │ │ ├── sepia.js │ │ ├── smaa.js │ │ ├── ssao.js │ │ ├── texture.js │ │ ├── tilt-shift.js │ │ ├── tone-mapping.js │ │ └── vignette.js │ │ ├── index.js │ │ ├── objects │ │ ├── CornellBox.js │ │ ├── Domain.js │ │ └── Shapes.js │ │ ├── shims │ │ └── require.js │ │ └── utils │ │ ├── ArrayUtils.js │ │ ├── CameraUtils.js │ │ ├── FPSMeter.js │ │ └── index.js ├── config │ ├── _default │ │ ├── config.json │ │ ├── menu.en.json │ │ ├── params.json │ │ └── privacy.json │ └── development │ │ └── config.json ├── content │ ├── _index.en.md │ ├── attribution.en.md │ ├── custom-effects.en.md │ ├── demos │ │ ├── _index.en.md │ │ ├── anti-aliasing │ │ │ ├── _index.en.md │ │ │ ├── fxaa.en.md │ │ │ ├── msaa.en.md │ │ │ └── smaa.en.md │ │ ├── color-grading │ │ │ ├── _index.en.md │ │ │ ├── brightness-contrast.en.md │ │ │ ├── hue-saturation.en.md │ │ │ ├── lut.en.md │ │ │ ├── sepia.en.md │ │ │ └── tone-mapping.en.md │ │ ├── light-shadow │ │ │ ├── _index.en.md │ │ │ ├── bloom.en.md │ │ │ ├── god-rays.en.md │ │ │ └── ssao.en.md │ │ ├── special-effects │ │ │ ├── _index.en.md │ │ │ ├── ascii.en.md │ │ │ ├── chromatic-aberration.en.md │ │ │ ├── color-depth.en.md │ │ │ ├── depth-of-field.en.md │ │ │ ├── dot-screen.en.md │ │ │ ├── glitch.en.md │ │ │ ├── grid.en.md │ │ │ ├── noise.en.md │ │ │ ├── pixelation.en.md │ │ │ ├── scanlines.en.md │ │ │ ├── shock-wave.en.md │ │ │ ├── tilt-shift.en.md │ │ │ └── vignette.en.md │ │ └── utility │ │ │ ├── _index.en.md │ │ │ ├── blur.en.md │ │ │ ├── depth-picking.en.md │ │ │ ├── outline.en.md │ │ │ ├── texture.en.md │ │ │ └── tone-mapping.en.md │ ├── getting-started.en.md │ ├── legal.en.md │ ├── migration-guide.en.md │ ├── plugins-tools.en.md │ └── privacy.en.md ├── i18n │ └── en.json ├── layouts │ ├── _default │ │ ├── _markup │ │ │ └── render-heading.html │ │ ├── baseof.html │ │ ├── list.html │ │ ├── section.html │ │ └── single.html │ ├── index.html │ └── partials │ │ ├── contents.html │ │ ├── footer.html │ │ ├── header.html │ │ ├── menu-item.html │ │ ├── menu.html │ │ ├── navigation.html │ │ ├── pagination.html │ │ └── viewport.html ├── postcss.config.cjs └── static │ ├── fonts │ ├── roboto-v20-latin-300.woff │ ├── roboto-v20-latin-300.woff2 │ ├── roboto-v20-latin-regular.woff │ └── roboto-v20-latin-regular.woff2 │ ├── img │ ├── svg │ │ ├── LICENSE.md │ │ ├── chevron_left_black_24dp.svg │ │ ├── chevron_left_white_24dp.svg │ │ ├── code_black_24dp.svg │ │ ├── code_white_24dp.svg │ │ ├── dark_mode_black_24dp.svg │ │ ├── dark_mode_white_24dp.svg │ │ ├── error_black_24dp.svg │ │ ├── error_white_24dp.svg │ │ ├── fullscreen_black_24dp.svg │ │ ├── fullscreen_exit_black_24dp.svg │ │ ├── fullscreen_exit_white_24dp.svg │ │ ├── fullscreen_white_24dp.svg │ │ ├── github_black_24dp.svg │ │ ├── github_white_24dp.svg │ │ ├── heart_black_24dp.svg │ │ ├── heart_white_24dp.svg │ │ ├── keyboard_black_24dp.svg │ │ ├── keyboard_white_24dp.svg │ │ ├── menu_open_black_24dp.svg │ │ ├── menu_open_white_24dp.svg │ │ ├── mouse_black_24dp.svg │ │ ├── mouse_white_24dp.svg │ │ ├── open_in_new_black_24dp.svg │ │ ├── open_in_new_white_24dp.svg │ │ ├── patreon_black_24dp.svg │ │ ├── patreon_white_24dp.svg │ │ ├── warning_black_24dp.svg │ │ └── warning_white_24dp.svg │ └── textures │ │ ├── LICENSE.md │ │ ├── lens-dirt │ │ ├── LICENSE.md │ │ └── scratches.jpg │ │ ├── lut │ │ ├── 3dl │ │ │ └── presetpro-cinematic.3dl │ │ ├── LICENSE.md │ │ ├── cube │ │ │ ├── django-25.cube │ │ │ └── presetpro-cinematic.cube │ │ └── png │ │ │ ├── bleach-bypass.png │ │ │ ├── candle-light.png │ │ │ ├── cool-contrast.png │ │ │ ├── desaturated-fog.png │ │ │ ├── evening.png │ │ │ ├── fall.png │ │ │ ├── filmic1.png │ │ │ ├── filmic2.png │ │ │ ├── matrix-green.png │ │ │ ├── strong-amber.png │ │ │ └── warm-contrast.png │ │ ├── pattern.png │ │ ├── perturb.jpg │ │ ├── photos │ │ └── GEDC0053.jpg │ │ └── skies │ │ ├── cloudy │ │ ├── nx.png │ │ ├── ny.png │ │ ├── nz.png │ │ ├── px.png │ │ ├── py.png │ │ └── pz.png │ │ └── sunset │ │ ├── nx.png │ │ ├── ny.png │ │ ├── nz.png │ │ ├── px.png │ │ ├── py.png │ │ └── pz.png │ └── models │ └── rigged-simple │ ├── LICENSE.md │ ├── RiggedSimple.gltf │ └── RiggedSimple0.bin ├── package.json ├── pnpm-lock.yaml ├── src ├── core │ ├── Disposable.js │ ├── EffectComposer.js │ ├── EffectShaderData.js │ ├── GaussKernel.js │ ├── ImmutableTimer.js │ ├── Initializable.js │ ├── OverrideMaterialManager.js │ ├── Resizable.js │ ├── Resolution.js │ ├── Selection.js │ ├── Timer.js │ └── index.js ├── effects │ ├── ASCIIEffect.js │ ├── BloomEffect.js │ ├── BokehEffect.js │ ├── BrightnessContrastEffect.js │ ├── ChromaticAberrationEffect.js │ ├── ColorAverageEffect.js │ ├── ColorDepthEffect.js │ ├── DepthEffect.js │ ├── DepthOfFieldEffect.js │ ├── DotScreenEffect.js │ ├── Effect.js │ ├── FXAAEffect.js │ ├── GammaCorrectionEffect.js │ ├── GlitchEffect.js │ ├── GodRaysEffect.js │ ├── GridEffect.js │ ├── HueSaturationEffect.js │ ├── LUT1DEffect.js │ ├── LUT3DEffect.js │ ├── LensDistortionEffect.js │ ├── NoiseEffect.js │ ├── OutlineEffect.js │ ├── PixelationEffect.js │ ├── RealisticBokehEffect.js │ ├── SMAAEffect.js │ ├── SSAOEffect.js │ ├── ScanlineEffect.js │ ├── SelectiveBloomEffect.js │ ├── SepiaEffect.js │ ├── ShockWaveEffect.js │ ├── TextureEffect.js │ ├── TiltShiftEffect.js │ ├── ToneMappingEffect.js │ ├── VignetteEffect.js │ ├── blending │ │ ├── BlendMode.js │ │ ├── glsl │ │ │ ├── add.frag │ │ │ ├── alpha.frag │ │ │ ├── average.frag │ │ │ ├── color-burn.frag │ │ │ ├── color-dodge.frag │ │ │ ├── color.frag │ │ │ ├── darken.frag │ │ │ ├── difference.frag │ │ │ ├── divide.frag │ │ │ ├── exclusion.frag │ │ │ ├── hard-light.frag │ │ │ ├── hard-mix.frag │ │ │ ├── hue.frag │ │ │ ├── invert-rgb.frag │ │ │ ├── invert.frag │ │ │ ├── lighten.frag │ │ │ ├── linear-burn.frag │ │ │ ├── linear-dodge.frag │ │ │ ├── linear-light.frag │ │ │ ├── luminosity.frag │ │ │ ├── multiply.frag │ │ │ ├── negation.frag │ │ │ ├── normal.frag │ │ │ ├── overlay.frag │ │ │ ├── pin-light.frag │ │ │ ├── reflect.frag │ │ │ ├── saturation.frag │ │ │ ├── screen.frag │ │ │ ├── soft-light.frag │ │ │ ├── src.frag │ │ │ ├── subtract.frag │ │ │ └── vivid-light.frag │ │ └── index.js │ ├── glsl │ │ ├── ascii.frag │ │ ├── bloom.frag │ │ ├── bokeh.frag │ │ ├── brightness-contrast.frag │ │ ├── chromatic-aberration.frag │ │ ├── chromatic-aberration.vert │ │ ├── color-average.frag │ │ ├── color-depth.frag │ │ ├── depth-of-field.frag │ │ ├── depth.frag │ │ ├── dot-screen.frag │ │ ├── fxaa.frag │ │ ├── fxaa.vert │ │ ├── gamma-correction.frag │ │ ├── glitch.frag │ │ ├── god-rays.frag │ │ ├── grid.frag │ │ ├── hue-saturation.frag │ │ ├── lens-distortion.frag │ │ ├── lut-1d.frag │ │ ├── lut-3d.frag │ │ ├── noise.frag │ │ ├── outline.frag │ │ ├── outline.vert │ │ ├── pixelation.frag │ │ ├── realistic-bokeh.frag │ │ ├── scanlines.frag │ │ ├── sepia.frag │ │ ├── shock-wave.frag │ │ ├── shock-wave.vert │ │ ├── smaa.frag │ │ ├── smaa.vert │ │ ├── ssao.frag │ │ ├── texture.frag │ │ ├── texture.vert │ │ ├── tilt-shift.frag │ │ ├── tilt-shift.vert │ │ ├── tone-mapping.frag │ │ └── vignette.frag │ └── index.js ├── enums │ ├── BlendFunction.js │ ├── ColorChannel.js │ ├── DepthCopyMode.js │ ├── DepthTestStrategy.js │ ├── EdgeDetectionMode.js │ ├── EffectAttribute.js │ ├── EffectShaderSection.js │ ├── GlitchMode.js │ ├── KernelSize.js │ ├── LUTOperation.js │ ├── MaskFunction.js │ ├── PredicationMode.js │ ├── SMAAPreset.js │ ├── ToneMappingMode.js │ ├── VignetteTechnique.js │ ├── WebGLExtension.js │ └── index.js ├── index.js ├── loaders │ ├── LUT3dlLoader.js │ ├── LUTCubeLoader.js │ ├── SMAAImageLoader.js │ └── index.js ├── materials │ ├── AdaptiveLuminanceMaterial.js │ ├── BokehMaterial.js │ ├── BoxBlurMaterial.js │ ├── CircleOfConfusionMaterial.js │ ├── CopyMaterial.js │ ├── DepthComparisonMaterial.js │ ├── DepthCopyMaterial.js │ ├── DepthDownsamplingMaterial.js │ ├── DepthMaskMaterial.js │ ├── DownsamplingMaterial.js │ ├── EdgeDetectionMaterial.js │ ├── EffectMaterial.js │ ├── GaussianBlurMaterial.js │ ├── GodRaysMaterial.js │ ├── KawaseBlurMaterial.js │ ├── LuminanceMaterial.js │ ├── MaskMaterial.js │ ├── OutlineMaterial.js │ ├── SMAAWeightsMaterial.js │ ├── SSAOMaterial.js │ ├── TiltShiftBlurMaterial.js │ ├── UpsamplingMaterial.js │ ├── glsl │ │ ├── adaptive-luminance.frag │ │ ├── circle-of-confusion.frag │ │ ├── common.vert │ │ ├── convolution.bokeh.frag │ │ ├── convolution.box.frag │ │ ├── convolution.box.vert │ │ ├── convolution.downsampling.frag │ │ ├── convolution.downsampling.vert │ │ ├── convolution.gaussian.frag │ │ ├── convolution.gaussian.vert │ │ ├── convolution.god-rays.frag │ │ ├── convolution.kawase.frag │ │ ├── convolution.kawase.vert │ │ ├── convolution.tilt-shift.frag │ │ ├── convolution.tilt-shift.vert │ │ ├── convolution.upsampling.frag │ │ ├── convolution.upsampling.vert │ │ ├── copy.frag │ │ ├── depth-comparison.frag │ │ ├── depth-comparison.vert │ │ ├── depth-copy.frag │ │ ├── depth-copy.vert │ │ ├── depth-downsampling.frag │ │ ├── depth-downsampling.vert │ │ ├── depth-mask.frag │ │ ├── edge-detection.frag │ │ ├── edge-detection.vert │ │ ├── effect.frag │ │ ├── effect.vert │ │ ├── luminance.frag │ │ ├── mask.frag │ │ ├── outline.frag │ │ ├── outline.vert │ │ ├── smaa-weights.frag │ │ ├── smaa-weights.vert │ │ ├── ssao.frag │ │ └── ssao.vert │ └── index.js ├── passes │ ├── AdaptiveLuminancePass.js │ ├── BoxBlurPass.js │ ├── ClearMaskPass.js │ ├── ClearPass.js │ ├── CopyPass.js │ ├── DepthCopyPass.js │ ├── DepthDownsamplingPass.js │ ├── DepthPass.js │ ├── DepthPickingPass.js │ ├── EffectPass.js │ ├── GaussianBlurPass.js │ ├── KawaseBlurPass.js │ ├── LambdaPass.js │ ├── LuminancePass.js │ ├── MaskPass.js │ ├── MipmapBlurPass.js │ ├── NormalPass.js │ ├── Pass.js │ ├── RenderPass.js │ ├── ShaderPass.js │ ├── TiltShiftBlurPass.js │ └── index.js ├── textures │ ├── ASCIITexture.js │ ├── NoiseTexture.js │ ├── RawImageData.js │ ├── index.js │ ├── lut │ │ ├── LookupTexture.js │ │ ├── TetrahedralUpscaler.js │ │ ├── index.js │ │ └── worker.js │ └── smaa │ │ ├── SMAAAreaImageData.js │ │ ├── SMAAImageGenerator.js │ │ ├── SMAASearchImageData.js │ │ ├── area.png │ │ ├── areaImageDataURL.js │ │ ├── index.js │ │ ├── search.cropped.png │ │ ├── search.png │ │ ├── searchImageDataURL.js │ │ └── worker.js └── utils │ ├── IdManager.js │ ├── index.js │ ├── orthographicDepthToViewZ.js │ └── viewZToOrthographicDepth.js ├── test ├── core │ ├── EffectComposer.js │ ├── GaussKernel.js │ ├── OverrideMaterialManager.js │ ├── Resolution.js │ ├── Selection.js │ └── Timer.js ├── effects │ ├── ASCIIEffect.js │ ├── BloomEffect.js │ ├── BokehEffect.js │ ├── BrightnessContrastEffect.js │ ├── ChromaticAberrationEffect.js │ ├── ColorAverageEffect.js │ ├── ColorDepthEffect.js │ ├── DepthEffect.js │ ├── DepthOfFieldEffect.js │ ├── DotScreenEffect.js │ ├── Effect.js │ ├── FXAAEffect.js │ ├── GammaCorrectionEffect.js │ ├── GlitchEffect.js │ ├── GodRaysEffect.js │ ├── GridEffect.js │ ├── HueSaturationEffect.js │ ├── LUT1DEffect.js │ ├── LUT3DEffect.js │ ├── LensDistortionEffect.js │ ├── NoiseEffect.js │ ├── OutlineEffect.js │ ├── PixelationEffect.js │ ├── RealisticBokehEffect.js │ ├── SMAAEffect.js │ ├── SSAOEffect.js │ ├── ScanlineEffect.js │ ├── SelectiveBloomEffect.js │ ├── SepiaEffect.js │ ├── ShockWaveEffect.js │ ├── TextureEffect.js │ ├── TiltShiftEffect.js │ ├── ToneMappingEffect.js │ ├── VignetteEffect.js │ └── blending │ │ └── BlendMode.js ├── images │ ├── RawImageData.js │ ├── lut │ │ └── TetrahedralUpscaler.js │ ├── smaa │ │ └── SMAAImageGenerator.js │ └── textures │ │ ├── LookupTexture3D.js │ │ └── NoiseTexture.js ├── loaders │ ├── LUT3dlLoader.js │ ├── LUTCubeLoader.js │ └── SMAAImageLoader.js ├── materials │ ├── AdaptiveLuminanceMaterial.js │ ├── BokehMaterial.js │ ├── BoxBlurMaterial.js │ ├── CircleOfConfusionMaterial.js │ ├── CopyMaterial.js │ ├── DepthComparisonMaterial.js │ ├── DepthCopyMaterial.js │ ├── DepthDownsamplingMaterial.js │ ├── DepthMaskMaterial.js │ ├── DownsamplingMaterial.js │ ├── EdgeDetectionMaterial.js │ ├── EffectMaterial.js │ ├── GaussianBlurMaterial.js │ ├── GodRaysMaterial.js │ ├── KawaseBlurMaterial.js │ ├── LuminanceMaterial.js │ ├── MaskMaterial.js │ ├── OutlineMaterial.js │ ├── SMAAWeightsMaterial.js │ ├── SSAOMaterial.js │ ├── TiltShiftBlurMaterial.js │ └── UpsamplingMaterial.js └── passes │ ├── AdaptiveLuminancePass.js │ ├── BoxBlurPass.js │ ├── ClearMaskPass.js │ ├── ClearPass.js │ ├── CopyPass.js │ ├── DepthCopyPass.js │ ├── DepthDownsamplingPass.js │ ├── DepthPass.js │ ├── DepthPickingPass.js │ ├── EffectPass.js │ ├── GaussianBlurPass.js │ ├── KawaseBlurPass.js │ ├── LambdaPass.js │ ├── LuminancePass.js │ ├── MaskPass.js │ ├── MipmapBlurPass.js │ ├── NormalPass.js │ ├── Pass.js │ ├── RenderPass.js │ ├── ShaderPass.js │ └── TiltShiftBlurPass.js ├── tsconfig.json └── types └── index.d.ts /.esdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "source": "src", 4 | "destination": "public/docs", 5 | 6 | "plugins": [{ 7 | "name": "esdoc-standard-plugin", 8 | "option": { 9 | "accessor": { 10 | "access": ["public", "protected"], 11 | "autoPrivate": true 12 | } 13 | } 14 | }, { 15 | "name": "esdoc-importpath-plugin", 16 | "option": { 17 | "stripPackageName": false, 18 | "replaces": [{ 19 | "from": "^src/.*", 20 | "to": "" 21 | }] 22 | } 23 | }] 24 | 25 | } 26 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Linguist settings 5 | *.3dl linguist-language=Text 6 | *.cube linguist-language=Text 7 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [vanruesc] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report about a potential defect 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | 9 | ### Description of the bug 10 | 11 | A clear and concise description of what the bug is. 12 | 13 | 14 | ### To reproduce 15 | 16 | Describe the steps to reproduce the behavior and provide a minimal example that demonstrates the issue. You can use the demo sandbox as a starting point: https://stackblitz.com/edit/postprocessing-v6 17 | 18 | 19 | ### Expected behavior 20 | 21 | A clear and concise description of what you expected to happen. 22 | 23 | 24 | ### Screenshots 25 | 26 | If applicable, add screenshots to help explain your problem. 27 | 28 | 29 | ### Library versions used 30 | 31 | - Three: [e.g. X.XXX.X] 32 | - Post Processing: [e.g. X.X.X] 33 | 34 | 35 | ### Desktop 36 | 37 | - OS: [e.g. Windows] 38 | - Browser [e.g. Chrome X.X.X.X] 39 | - Graphics hardware: [e.g. NVIDIA] 40 | 41 | 42 | ### Mobile 43 | 44 | - Device: [e.g. iPhone] 45 | - OS: [e.g. Android] 46 | - Browser [e.g. Firefox X.X.X] 47 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: feature request 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Is your feature request related to a problem? 11 | 12 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 13 | 14 | 15 | ### Describe the solution you'd like 16 | 17 | A clear and concise description of what you want to happen. 18 | 19 | 20 | ### Describe alternatives you've considered 21 | 22 | A clear and concise description of any alternative solutions or features you've considered. 23 | 24 | 25 | ### Additional context 26 | 27 | Add any other context or screenshots about the feature request here. 28 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Related issue: #XXXX 2 | 3 | ### Description 4 | 5 | A clear and concise description of what the problem was and how this pull request solves it. 6 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - "*" 8 | 9 | jobs: 10 | test: 11 | name: Test 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Git checkout 15 | uses: actions/checkout@v4 16 | - name: Install PNPM 17 | uses: pnpm/action-setup@v4 18 | with: 19 | version: 10 20 | - name: Install Node 21 | uses: actions/setup-node@v4 22 | with: 23 | node-version: 22 24 | cache: "pnpm" 25 | - name: Install and test 26 | run: pnpm install-test --frozen-lockfile 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows 2 | Thumbs.db 3 | ehthumbs.db 4 | Desktop.ini 5 | $RECYCLE.BIN/ 6 | *.lnk 7 | 8 | # Linux 9 | *.swp 10 | *.*-swp 11 | 12 | # OSX 13 | .DS_Store 14 | .AppleDouble 15 | .LSOverride 16 | ._* 17 | .Spotlight-V100 18 | .Trashes 19 | .AppleDB 20 | .AppleDesktop 21 | Network Trash Folder 22 | Temporary Items 23 | .apdisk 24 | 25 | # IDE settings 26 | .project 27 | .idea 28 | .vscore 29 | 30 | # Node 31 | node_modules 32 | package-lock.json 33 | 34 | # Generated files 35 | dist/ 36 | build/ 37 | public/ 38 | temp/ 39 | resources/ 40 | *.lock 41 | *.log 42 | *.tmp 43 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2015 Raoul van Rüschen 2 | 3 | This software is provided 'as-is', without any express or implied warranty. In 4 | no event will the authors be held liable for any damages arising from the use of 5 | this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, including 8 | commercial applications, and to alter it and redistribute it freely, subject to 9 | the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim 12 | that you wrote the original software. If you use this software in a product, 13 | an acknowledgment in the product documentation would be appreciated but is 14 | not required. 15 | 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 19 | 3. This notice may not be removed or altered from any source distribution. 20 | -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | # Post Processing Demo (Legacy) 2 | 3 | This directory contains the source files of the old demos. For up-to-date examples, please refer to the [manual demos](https://github.com/pmndrs/postprocessing/tree/main/manual/assets/js/src/demos). 4 | -------------------------------------------------------------------------------- /demo/src/demos/objects/RiggedSimple.js: -------------------------------------------------------------------------------- 1 | import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js"; 2 | 3 | /** 4 | * The tag under which the asset is stored. 5 | */ 6 | 7 | export const tag = "rigged-simple"; 8 | 9 | /** 10 | * Loads a simple rigged model. 11 | * 12 | * @param {Map} assets - A collection of assets. 13 | * @param {LoadingManager} manager - A loading manager. 14 | */ 15 | 16 | export function load(assets, manager) { 17 | 18 | const gltfLoader = new GLTFLoader(manager); 19 | const url = "models/rigged-simple/RiggedSimple.gltf"; 20 | 21 | gltfLoader.load(url, (gltf) => { 22 | 23 | gltf.scene.traverse((object) => { 24 | 25 | if(object.isMesh) { 26 | 27 | object.castShadow = object.receiveShadow = true; 28 | 29 | } 30 | 31 | }); 32 | 33 | gltf.scene.scale.multiplyScalar(0.2); 34 | 35 | assets.set(tag, gltf); 36 | 37 | }); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /demo/src/utils/ProgressManager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A progress bar. 3 | * 4 | * @type {HTMLElement} 5 | * @private 6 | */ 7 | 8 | let progressBar = null; 9 | 10 | /** 11 | * A progress manager. 12 | */ 13 | 14 | export class ProgressManager { 15 | 16 | /** 17 | * Initializes the progress manager. 18 | */ 19 | 20 | static initialize() { 21 | 22 | progressBar = document.querySelector(".progress-bar > div"); 23 | 24 | } 25 | 26 | /** 27 | * Sets the loading progress. 28 | * 29 | * @param {Number} url - The current item's URL. 30 | * @param {Number} loaded - The amount of loaded items. 31 | * @param {Number} total - The amount of total items. 32 | */ 33 | 34 | static updateProgress(url, loaded, total) { 35 | 36 | const progress = (loaded / total * 100.0); 37 | progressBar.style.width = progress.toFixed(0) + "%"; 38 | 39 | } 40 | 41 | /** 42 | * Resets the loading progress. 43 | */ 44 | 45 | static reset() { 46 | 47 | progressBar.removeAttribute("style"); 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /demo/static/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/static/github.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/static/info.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/static/models/rigged-simple/README.md: -------------------------------------------------------------------------------- 1 | # Rigged Simple 2 | ## Screenshot 3 | 4 |  5 | 6 | ## License Information 7 | 8 | Donated by [Cesium](http://cesiumjs.org/) for glTF testing. 9 | 10 | This model is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/). 11 | -------------------------------------------------------------------------------- /demo/static/models/rigged-simple/RiggedSimple0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/rigged-simple/RiggedSimple0.bin -------------------------------------------------------------------------------- /demo/static/models/sponza/10381718147657362067.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/10381718147657362067.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/10388182081421875623.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/10388182081421875623.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/11474523244911310074.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/11474523244911310074.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/11490520546946913238.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/11490520546946913238.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/11872827283454512094.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/11872827283454512094.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/11968150294050148237.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/11968150294050148237.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/1219024358953944284.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/1219024358953944284.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/12501374198249454378.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/12501374198249454378.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/13196865903111448057.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/13196865903111448057.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/13824894030729245199.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/13824894030729245199.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/13982482287905699490.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/13982482287905699490.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/14118779221266351425.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/14118779221266351425.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/14170708867020035030.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/14170708867020035030.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/14267839433702832875.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/14267839433702832875.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/14650633544276105767.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/14650633544276105767.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/15295713303328085182.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/15295713303328085182.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/15722799267630235092.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/15722799267630235092.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/16275776544635328252.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/16275776544635328252.png -------------------------------------------------------------------------------- /demo/static/models/sponza/16299174074766089871.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/16299174074766089871.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/16885566240357350108.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/16885566240357350108.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/17556969131407844942.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/17556969131407844942.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/17876391417123941155.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/17876391417123941155.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/2051777328469649772.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/2051777328469649772.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/2185409758123873465.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/2185409758123873465.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/2299742237651021498.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/2299742237651021498.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/2374361008830720677.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/2374361008830720677.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/2411100444841994089.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/2411100444841994089.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/2775690330959970771.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/2775690330959970771.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/2969916736137545357.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/2969916736137545357.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/332936164838540657.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/332936164838540657.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/3371964815757888145.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/3371964815757888145.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/3455394979645218238.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/3455394979645218238.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/3628158980083700836.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/3628158980083700836.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/3827035219084910048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/3827035219084910048.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/4477655471536070370.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/4477655471536070370.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/4601176305987539675.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/4601176305987539675.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/466164707995436622.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/466164707995436622.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/4675343432951571524.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/4675343432951571524.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/4871783166746854860.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/4871783166746854860.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/4910669866631290573.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/4910669866631290573.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/4975155472559461469.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/4975155472559461469.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/5061699253647017043.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/5061699253647017043.png -------------------------------------------------------------------------------- /demo/static/models/sponza/5792855332885324923.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/5792855332885324923.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/5823059166183034438.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/5823059166183034438.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/6047387724914829168.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/6047387724914829168.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/6151467286084645207.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/6151467286084645207.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/6593109234861095314.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/6593109234861095314.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/6667038893015345571.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/6667038893015345571.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/6772804448157695701.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/6772804448157695701.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/7056944414013900257.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/7056944414013900257.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/715093869573992647.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/715093869573992647.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/7268504077753552595.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/7268504077753552595.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/7441062115984513793.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/7441062115984513793.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/755318871556304029.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/755318871556304029.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/759203620573749278.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/759203620573749278.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/7645212358685992005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/7645212358685992005.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/7815564343179553343.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/7815564343179553343.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/8006627369776289000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8006627369776289000.png -------------------------------------------------------------------------------- /demo/static/models/sponza/8051790464816141987.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8051790464816141987.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/8114461559286000061.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8114461559286000061.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/8481240838833932244.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8481240838833932244.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/8503262930880235456.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8503262930880235456.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/8747919177698443163.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8747919177698443163.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/8750083169368950601.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8750083169368950601.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/8773302468495022225.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8773302468495022225.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/8783994986360286082.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/8783994986360286082.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/9288698199695299068.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/9288698199695299068.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/9916269861720640319.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/9916269861720640319.jpg -------------------------------------------------------------------------------- /demo/static/models/sponza/Sponza.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/Sponza.bin -------------------------------------------------------------------------------- /demo/static/models/sponza/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/models/sponza/white.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/bleach-bypass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/bleach-bypass.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/candle-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/candle-light.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/cool-contrast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/cool-contrast.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/desaturated-fog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/desaturated-fog.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/evening.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/evening.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/fall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/fall.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/filmic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/filmic1.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/filmic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/filmic2.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/matrix-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/matrix-green.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/strong-amber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/strong-amber.png -------------------------------------------------------------------------------- /demo/static/textures/lut/png/warm-contrast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/lut/png/warm-contrast.png -------------------------------------------------------------------------------- /demo/static/textures/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/pattern.png -------------------------------------------------------------------------------- /demo/static/textures/perturb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/perturb.jpg -------------------------------------------------------------------------------- /demo/static/textures/scratches.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/scratches.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-dark/nx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-dark/nx.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-dark/ny.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-dark/ny.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-dark/nz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-dark/nz.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-dark/px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-dark/px.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-dark/py.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-dark/py.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-dark/pz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-dark/pz.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-green/nx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-green/nx.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-green/ny.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-green/ny.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-green/nz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-green/nz.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-green/px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-green/px.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-green/py.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-green/py.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/space-green/pz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/space-green/pz.jpg -------------------------------------------------------------------------------- /demo/static/textures/skies/sunset/nx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/sunset/nx.png -------------------------------------------------------------------------------- /demo/static/textures/skies/sunset/ny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/sunset/ny.png -------------------------------------------------------------------------------- /demo/static/textures/skies/sunset/nz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/sunset/nz.png -------------------------------------------------------------------------------- /demo/static/textures/skies/sunset/px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/sunset/px.png -------------------------------------------------------------------------------- /demo/static/textures/skies/sunset/py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/sunset/py.png -------------------------------------------------------------------------------- /demo/static/textures/skies/sunset/pz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/demo/static/textures/skies/sunset/pz.png -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import aether from "eslint-config-aether"; 2 | export default [...aether]; 3 | -------------------------------------------------------------------------------- /manual/.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard-scss", 3 | "plugins": [ 4 | "stylelint-order" 5 | ], 6 | "rules": { 7 | "scss/dollar-variable-pattern": null, 8 | "scss/no-global-function-names": null, 9 | "scss/operator-no-newline-after": null, 10 | "order/properties-alphabetical-order": true, 11 | "color-function-notation": null, 12 | "color-hex-length": null, 13 | "color-named": null, 14 | "declaration-empty-line-before": null, 15 | "max-nesting-depth": null, 16 | "no-descending-specificity": null, 17 | "no-empty-source": null, 18 | "no-invalid-position-at-import-rule": null, 19 | "rule-empty-line-before": null, 20 | "selector-class-pattern": null, 21 | "selector-max-compound-selectors": null, 22 | "selector-max-id": null, 23 | "selector-no-qualifying-type": null, 24 | "shorthand-property-no-redundant-values": null 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /manual/README.md: -------------------------------------------------------------------------------- 1 | # Post Processing Manual 2 | 3 | This directory contains the source files of the manual. The page content is located in the `content` folder. Images and other static files can be found in the `static` folder. Demo sources, page scripts and stylesheet sources reside in the `assets` folder. See https://gohugo.io/content-management/ for more information. 4 | -------------------------------------------------------------------------------- /manual/assets/README.md: -------------------------------------------------------------------------------- 1 | # Theme Assets 2 | 3 | This directory contains assets that are used in the layout templates. Hugo provides the [resources.Get](https://gohugo.io/content-management/page-resources/) function to organize assets as resource bundles. 4 | -------------------------------------------------------------------------------- /manual/assets/css/README.md: -------------------------------------------------------------------------------- 1 | # CSS 2 | 3 | This directory contains the stylesheet source files. The manual styles follow an incremental, mobile-first approach. 4 | -------------------------------------------------------------------------------- /manual/assets/css/src/_fonts.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * @see https://google-webfonts-helper.herokuapp.com/ 3 | */ 4 | 5 | @font-face { 6 | font-display: swap; 7 | font-family: Roboto; 8 | font-style: normal; 9 | font-weight: 300; 10 | src: 11 | local(""), 12 | url("/fonts/roboto-v20-latin-300.woff2") format("woff2"), 13 | url("/fonts/roboto-v20-latin-300.woff") format("woff"); 14 | } 15 | 16 | @font-face { 17 | font-display: swap; 18 | font-family: Roboto; 19 | font-style: normal; 20 | font-weight: 400; 21 | src: 22 | local(""), 23 | url("/fonts/roboto-v20-latin-regular.woff2") format("woff2"), 24 | url("/fonts/roboto-v20-latin-regular.woff") format("woff"); 25 | } 26 | -------------------------------------------------------------------------------- /manual/assets/css/src/_keyframes.scss: -------------------------------------------------------------------------------- 1 | @keyframes cubemove { 2 | 25% { 3 | transform: translateX(42px) rotate(-90deg) scale(0.5); 4 | } 5 | 50% { 6 | transform: translateX(42px) translateY(42px) rotate(-179deg); 7 | } 8 | 50.1% { 9 | transform: translateX(42px) translateY(42px) rotate(-180deg); 10 | } 11 | 75% { 12 | transform: translateX(0) translateY(42px) rotate(-270deg) scale(0.5); 13 | } 14 | 100% { 15 | transform: rotate(-360deg); 16 | } 17 | } 18 | 19 | @keyframes cubegrid { 20 | 0%, 70%, 100% { 21 | transform: scale(1); 22 | } 23 | 35% { 24 | transform: scale(0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /manual/assets/css/src/index.scss: -------------------------------------------------------------------------------- 1 | @use "sass:meta"; 2 | @use "breakpoints"; 3 | @use "fonts"; 4 | @use "keyframes"; 5 | @use "themes"; 6 | @use "screen/default"; 7 | 8 | @media (min-width: breakpoints.$small) { 9 | @include meta.load-css("screen/small"); 10 | } 11 | 12 | @media (min-width: breakpoints.$medium) { 13 | @include meta.load-css("screen/medium"); 14 | } 15 | 16 | @media (min-width: breakpoints.$large) { 17 | @include meta.load-css("screen/large"); 18 | } 19 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/_index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Style definitions for all screens. 3 | */ 4 | 5 | @use "base/anchor"; 6 | @use "base/body"; 7 | @use "base/button"; 8 | @use "base/canvas"; 9 | @use "base/code"; 10 | @use "base/figure"; 11 | @use "base/heading"; 12 | @use "base/list"; 13 | @use "base/text"; 14 | @use "layout/contents"; 15 | @use "layout/footer"; 16 | @use "layout/frame-content"; 17 | @use "layout/header"; 18 | @use "layout/highlight"; 19 | @use "layout/main"; 20 | @use "layout/nav"; 21 | @use "layout/progress"; 22 | @use "layout/sidebar"; 23 | @use "layout/tweakpane"; 24 | @use "layout/viewport"; 25 | @use "layout/pages/depth-of-field"; 26 | @use "layout/pages/fxaa"; 27 | @use "layout/pages/smaa"; 28 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/base/_anchor.scss: -------------------------------------------------------------------------------- 1 | @use "durations"; 2 | @use "layers"; 3 | 4 | a { 5 | color: var(--anchor-color); 6 | text-decoration: none; 7 | transition: color durations.$short, background-color durations.$short; 8 | &:active, 9 | &:focus, 10 | &:hover { 11 | color: var(--anchor-color-focus); 12 | } 13 | } 14 | 15 | .skip-main { 16 | display: block; 17 | flex-shrink: 0; 18 | font-size: 75%; 19 | height: 1px; 20 | left: -100%; 21 | overflow: hidden; 22 | position: absolute; 23 | top: 0; 24 | width: 1px; 25 | z-index: layers.$hud; 26 | &:focus, 27 | &:visited { 28 | background: white; 29 | color: black; 30 | height: auto; 31 | left: 0; 32 | outline: 0; 33 | padding: 0.25rem; 34 | width: 100px; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/base/_body.scss: -------------------------------------------------------------------------------- 1 | @use "colors"; 2 | 3 | html { 4 | height: 100%; 5 | width: 100%; 6 | } 7 | 8 | body { 9 | background: var(--body-background-color); 10 | color: var(--foreground-color); 11 | font-family: Roboto, sans-serif; 12 | font-size: 14px; 13 | font-weight: 400; 14 | margin: 0; 15 | &.preload * { 16 | transition: none !important; 17 | } 18 | } 19 | 20 | .progress { 21 | cursor: progress; 22 | } 23 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/base/_canvas.scss: -------------------------------------------------------------------------------- 1 | canvas { 2 | background-color: var(--canvas-background-color); 3 | display: block; 4 | margin: auto; 5 | &.hidden { 6 | visibility: hidden; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/base/_code.scss: -------------------------------------------------------------------------------- 1 | code { 2 | color: var(--code-color); 3 | font-family: "Source Code Pro", Consolas, monospace; 4 | } 5 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/base/_figure.scss: -------------------------------------------------------------------------------- 1 | figure { 2 | margin: 1.25rem 0; 3 | img, 4 | svg { 5 | display: block; 6 | } 7 | } 8 | 9 | img { 10 | border: 0; 11 | outline: 0; 12 | } 13 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/base/_heading.scss: -------------------------------------------------------------------------------- 1 | @use "colors"; 2 | @use "durations"; 3 | 4 | h1, h2, h3, h4, h5, h6 { 5 | margin: 2rem 0 1rem 0; 6 | } 7 | 8 | h1 { 9 | font-size: 175%; 10 | } 11 | 12 | h2 { 13 | font-size: 150%; 14 | } 15 | 16 | h3 { 17 | font-size: 125%; 18 | } 19 | 20 | h4 { 21 | font-size: 120%; 22 | } 23 | 24 | h5 { 25 | font-size: 115%; 26 | } 27 | 28 | h6 { 29 | font-size: 110%; 30 | } 31 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/base/_list.scss: -------------------------------------------------------------------------------- 1 | ul { 2 | padding-left: 1.5em; 3 | } 4 | 5 | li { 6 | padding: 0.125em 0; 7 | &::marker { 8 | color: var(--foreground-color); 9 | content: "\2022\2002"; 10 | opacity: 0.9; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/base/_text.scss: -------------------------------------------------------------------------------- 1 | p { 2 | margin: 1rem 0; 3 | .has-small-font-size { 4 | font-size: 90%; 5 | } 6 | .has-large-font-size { 7 | font-size: 110%; 8 | } 9 | .has-huge-font-size { 10 | font-size: 120%; 11 | } 12 | } 13 | 14 | strong { 15 | font-weight: 600; 16 | } 17 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/_contents.scss: -------------------------------------------------------------------------------- 1 | .contents { 2 | list-style: none; 3 | h2 { 4 | margin: 0.5rem 0; 5 | } 6 | li { 7 | &::marker { 8 | content: none; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/_frame-content.scss: -------------------------------------------------------------------------------- 1 | .frame-content > div { 2 | display: flex; 3 | flex-direction: row; 4 | min-height: 100vh; 5 | width: 100%; 6 | } 7 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/_header.scss: -------------------------------------------------------------------------------- 1 | @use "dimensions"; 2 | 3 | header { 4 | position: relative; 5 | } 6 | 7 | .page-header { 8 | background-color: var(--page-header-background-color); 9 | flex-grow: 0; 10 | .page-title { 11 | color: var(--page-title-foreground-color); 12 | font-size: 90%; 13 | font-weight: normal; 14 | letter-spacing: 1px; 15 | margin: 0; 16 | padding: 0.75rem 2rem 0.75rem dimensions.$nav-padding; 17 | text-transform: uppercase; 18 | a { 19 | color: var(--page-title-foreground-color); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/_highlight.scss: -------------------------------------------------------------------------------- 1 | .highlight { 2 | line-height: initial; 3 | pre { 4 | padding: 1rem; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/_main.scss: -------------------------------------------------------------------------------- 1 | @use "durations"; 2 | 3 | main { 4 | border: 0; 5 | flex-grow: 1; 6 | height: 100vh; 7 | outline: none; 8 | overflow: hidden scroll; 9 | } 10 | 11 | .content { 12 | align-items: center; 13 | box-sizing: border-box; 14 | display: flex; 15 | flex-direction: column; 16 | line-height: 1.5; 17 | min-height: 100vh; 18 | padding-bottom: 3rem; 19 | h1, h2, h3, h4, h5, h6 { 20 | a { 21 | opacity: 0; 22 | transition: color durations.$short, opacity durations.$short; 23 | } 24 | &:focus, 25 | &:hover { 26 | a { 27 | opacity: 1; 28 | } 29 | } 30 | } 31 | > div { 32 | box-sizing: border-box; 33 | max-width: calc(1024px + 2rem); 34 | padding: 0.5rem 1rem 2rem 1rem; 35 | width: 100%; 36 | } 37 | &:first-child { 38 | padding: 3rem 0; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/_tweakpane.scss: -------------------------------------------------------------------------------- 1 | @use "layers"; 2 | 3 | .tp { 4 | position: absolute; 5 | right: 3px; 6 | top: 3px; 7 | user-select: none; 8 | width: 256px; 9 | z-index: layers.$hud; 10 | &.hidden { 11 | visibility: hidden; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/pages/_depth-of-field.scss: -------------------------------------------------------------------------------- 1 | // Use a black background for the transparent CoC debug texture. 2 | .depth-of-field { 3 | canvas { 4 | background-color: black; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/pages/_fxaa.scss: -------------------------------------------------------------------------------- 1 | .fxaa { 2 | canvas { 3 | background-color: black; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/default/layout/pages/_smaa.scss: -------------------------------------------------------------------------------- 1 | // Use a black background for the transparent SMAA weights debug texture. 2 | .smaa { 3 | canvas { 4 | background-color: black; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/large/_index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Style definitions for large screens. 3 | */ 4 | 5 | @use "base/body"; 6 | @use "layout/main"; 7 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/large/base/_body.scss: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 18px; 3 | } 4 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/large/layout/_main.scss: -------------------------------------------------------------------------------- 1 | .content { 2 | > div { 3 | max-width: calc(1280px + 4rem); 4 | padding: 0.5rem 3rem 2rem 3rem; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/medium/_index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Style definitions for medium-sized screens. 3 | */ 4 | 5 | @use "base/body"; 6 | @use "layout/main"; 7 | @use "layout/sidebar"; 8 | @use "layout/tweakpane"; 9 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/medium/base/_body.scss: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 16px; 3 | } 4 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/medium/layout/_main.scss: -------------------------------------------------------------------------------- 1 | .content { 2 | > div { 3 | max-width: calc(1024px + 4rem); 4 | padding: 0.5rem 2rem 2rem 2rem; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/medium/layout/_sidebar.scss: -------------------------------------------------------------------------------- 1 | .sidebar { 2 | pointer-events: initial; 3 | position: relative; 4 | transform: none; 5 | transition: none; 6 | } 7 | 8 | .sidebar-button-open, 9 | .sidebar-button-close { 10 | display: none; 11 | } 12 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/medium/layout/_tweakpane.scss: -------------------------------------------------------------------------------- 1 | @use "layers"; 2 | 3 | .tp { 4 | right: 5px; 5 | top: 5px; 6 | width: 300px; 7 | } 8 | -------------------------------------------------------------------------------- /manual/assets/css/src/screen/small/_index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Style definitions for small screens. 3 | */ 4 | -------------------------------------------------------------------------------- /manual/assets/css/src/themes/_index.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Color themes. 3 | */ 4 | 5 | @use "default"; 6 | @use "dark"; 7 | @use "highlight-light"; 8 | @use "highlight-dark"; 9 | @use "tweakpane-light"; 10 | @use "tweakpane-dark"; 11 | -------------------------------------------------------------------------------- /manual/assets/css/src/values/_breakpoints.scss: -------------------------------------------------------------------------------- 1 | $small: 512px; 2 | $medium: 1024px; 3 | $large: 2048px; 4 | 5 | :root { 6 | --breakpoint-small: #{$small}; 7 | --breakpoint-medium: #{$medium}; 8 | --breakpoint-large: #{$large}; 9 | } 10 | -------------------------------------------------------------------------------- /manual/assets/css/src/values/_colors.scss: -------------------------------------------------------------------------------- 1 | @forward "colors-material"; 2 | @forward "colors-metro"; 3 | 4 | $bittersweet: rgb(254, 95, 95); 5 | $blue-chalk: rgb(241, 219, 255); 6 | $clam-shell: rgb(212, 182, 182); 7 | $space: rgb(16, 16, 16); 8 | $coal: rgb(20, 20, 20); 9 | $blind: rgb(24, 24, 24); 10 | $copper-rose: rgb(142, 100, 100); 11 | $flamingo: rgb(234, 83, 31); 12 | $mine-shaft: rgb(32, 32, 32); 13 | $periwinkle: rgb(204, 204, 255); 14 | $platinum: rgb(229, 228, 226); 15 | $shiny: rgb(93, 225, 249); 16 | $soft-amber: rgb(209, 198, 180); 17 | $tana: rgb(217, 220, 193); 18 | $tamarind: rgb(43, 22, 18); 19 | $terracotta: rgb(224, 128, 86); 20 | $tawny-port: rgb(118, 42, 90); 21 | $turkish-rose: rgb(175, 122, 125); 22 | $vanilla: rgb(209, 190, 168); 23 | $whimsical: rgb(255, 218, 116); 24 | -------------------------------------------------------------------------------- /manual/assets/css/src/values/_dimensions.scss: -------------------------------------------------------------------------------- 1 | $nav-width: 15%; 2 | $nav-padding: 1.5rem; 3 | -------------------------------------------------------------------------------- /manual/assets/css/src/values/_durations.scss: -------------------------------------------------------------------------------- 1 | $short: 0.3s; 2 | $medium: 0.5s; 3 | $long: 1s; 4 | -------------------------------------------------------------------------------- /manual/assets/css/src/values/_layers.scss: -------------------------------------------------------------------------------- 1 | $background: -1; 2 | $foreground: 0; 3 | $hud: 1; 4 | -------------------------------------------------------------------------------- /manual/assets/js/README.md: -------------------------------------------------------------------------------- 1 | # JavaScript 2 | 3 | This directory contains the JS/TS source files. All scripts in `src/demos` are compiled into individual bundles. 4 | -------------------------------------------------------------------------------- /manual/assets/js/libs/vendor.js: -------------------------------------------------------------------------------- 1 | export * from "three"; 2 | export * from "three/examples/jsm/loaders/GLTFLoader.js"; 3 | 4 | export { ControlMode, SpatialControls } from "spatial-controls"; 5 | export { Pane } from "tweakpane"; 6 | -------------------------------------------------------------------------------- /manual/assets/js/src/components/index.js: -------------------------------------------------------------------------------- 1 | export { NavigationManager } from "./NavigationManager"; 2 | export { SidebarManager } from "./SidebarManager"; 3 | export { ThemeManager } from "./ThemeManager"; 4 | export { ViewportManager } from "./ViewportManager"; 5 | -------------------------------------------------------------------------------- /manual/assets/js/src/index.js: -------------------------------------------------------------------------------- 1 | import { NavigationManager, SidebarManager, ThemeManager, ViewportManager } from "./components"; 2 | import { require } from "./shims/require"; 3 | Object.assign(window, { require }); 4 | 5 | /** 6 | * Performs tasks when the DOM content is ready. 7 | * 8 | * @param event - An event. 9 | */ 10 | 11 | window.addEventListener("DOMContentLoaded", (event) => { 12 | 13 | const components = [ 14 | new NavigationManager(), 15 | new SidebarManager(), 16 | new ThemeManager(), 17 | new ViewportManager() 18 | ]; 19 | 20 | for(const component of components) { 21 | 22 | component.initialize(); 23 | 24 | } 25 | 26 | }); 27 | 28 | /** 29 | * Performs tasks when the page has been fully loaded. 30 | * 31 | * @param event - An event. 32 | */ 33 | 34 | window.addEventListener("load", (event) => { 35 | 36 | document.body.classList.remove("preload"); 37 | 38 | }); 39 | -------------------------------------------------------------------------------- /manual/assets/js/src/shims/require.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A require shim for external bundles. 3 | */ 4 | 5 | export function require(name) { 6 | 7 | switch(name) { 8 | 9 | case "three": 10 | case "three/examples/jsm/loaders/GLTFLoader.js": 11 | case "tweakpane": 12 | case "spatial-controls": 13 | return window.VENDOR; 14 | 15 | default: 16 | throw new Error(`Cannot require ${name}`); 17 | 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /manual/assets/js/src/utils/ArrayUtils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts an array into a record object. 3 | * 4 | * @param {Record} a - The record. 5 | * @param {Number|String} b - The number. 6 | * @return {Record} The record. 7 | */ 8 | 9 | export function toRecord(a, b) { 10 | 11 | a[b] = b; 12 | return a; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /manual/assets/js/src/utils/CameraUtils.js: -------------------------------------------------------------------------------- 1 | const DEG2RAD = Math.PI / 180.0; 2 | const RAD2DEG = 180.0 / Math.PI; 3 | 4 | /** 5 | * Converts horizontal FoV to vertical FoV. 6 | * 7 | * @param horizontalFoV - The horizontal field of view. 8 | * @param aspect - The aspect ration. 9 | * @return The vertical field of view. 10 | */ 11 | 12 | export function calculateVerticalFoV(horizontalFoV, aspect = 16 / 9) { 13 | 14 | return Math.atan(Math.tan(horizontalFoV * DEG2RAD * 0.5) / aspect) * RAD2DEG * 2.0; 15 | 16 | } 17 | 18 | /** 19 | * Converts vertical FoV to horizontal FoV. 20 | * 21 | * @param verticalFoV - The vertical field of view. 22 | * @param aspect - The aspect ration. 23 | * @return The horizontal field of view. 24 | */ 25 | 26 | export function calculateHorizontalFoV(verticalFoV, aspect = 16 / 9) { 27 | 28 | return Math.atan(Math.tan(verticalFoV * DEG2RAD * 0.5) * aspect) * RAD2DEG * 2.0; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /manual/assets/js/src/utils/index.js: -------------------------------------------------------------------------------- 1 | export * from "./ArrayUtils"; 2 | export * from "./CameraUtils"; 3 | export { FPSMeter } from "./FPSMeter"; 4 | -------------------------------------------------------------------------------- /manual/config/_default/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseURL": "//pp.pmnd.rs", 3 | "title": "Post Processing Manual", 4 | "disableHugoGeneratorInject": true, 5 | "enableRobotsTXT": true, 6 | "googleAnalytics": "UA-123-45", 7 | "disableLiveReload": true, 8 | "buildFuture": true, 9 | "publishDir": "../public/manual/", 10 | "markup": { 11 | "goldmark": { 12 | "renderer": { 13 | "unsafe": true 14 | } 15 | }, 16 | "highlight": { 17 | "noClasses": false 18 | } 19 | }, 20 | "languages": { 21 | "en": { 22 | "weight": 1 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /manual/config/_default/menu.en.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": [ 3 | { 4 | "identifier": "docs", 5 | "name": "API Reference", 6 | "url": "../docs/", 7 | "weight": 100 8 | } 9 | ], 10 | "community": [ 11 | { 12 | "identifier": "bugs", 13 | "name": "Issue Tracker", 14 | "url": "https://github.com/pmndrs/postprocessing/issues", 15 | "weight": 70 16 | }, 17 | { 18 | "identifier": "discord", 19 | "name": "Discord", 20 | "url": "https://discord.com/invite/poimandres", 21 | "weight": 80 22 | }, 23 | { 24 | "identifier": "forum", 25 | "name": "Forum", 26 | "url": "https://github.com/pmndrs/postprocessing/discussions", 27 | "weight": 90 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /manual/config/_default/params.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Raoul van Rüschen", 3 | "paginate": 3, 4 | "manualURL": "https://github.com/pmndrs/postprocessing/tree/main/manual", 5 | "sidebarMenus": [ 6 | "main", 7 | "community", 8 | "demos" 9 | ], 10 | "footerIcons": [ 11 | { 12 | "name": "dark-mode" 13 | }, { 14 | "name": "repository", 15 | "url": "https://github.com/pmndrs/postprocessing" 16 | }, { 17 | "name": "support", 18 | "url": "https://www.patreon.com/vanruesc" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /manual/config/_default/privacy.json: -------------------------------------------------------------------------------- 1 | { 2 | "disqus": { 3 | "disable": true 4 | }, 5 | "googleAnalytics": { 6 | "disable": true 7 | }, 8 | "instagram": { 9 | "disable": true 10 | }, 11 | "twitter": { 12 | "disable": true 13 | }, 14 | "vimeo": { 15 | "disable": true 16 | }, 17 | "youtube": { 18 | "disable": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /manual/config/development/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseURL": "" 3 | } 4 | -------------------------------------------------------------------------------- /manual/content/demos/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: section 3 | collection: sections 4 | title: Demos 5 | draft: false 6 | --- 7 | -------------------------------------------------------------------------------- /manual/content/demos/anti-aliasing/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: section 3 | collection: sections 4 | title: Anti-Aliasing 5 | draft: false 6 | menu: 7 | demos: 8 | title: Anti-Aliasing 9 | identifier: anti-aliasing 10 | weight: 10 11 | --- 12 | -------------------------------------------------------------------------------- /manual/content/demos/anti-aliasing/fxaa.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: FXAA 5 | draft: false 6 | menu: 7 | demos: 8 | parent: anti-aliasing 9 | weight: 30 10 | script: fxaa 11 | --- 12 | 13 | # Fast Approximate Anti-Aliasing 14 | 15 | ### External Resources 16 | 17 | * [FXAA white paper](https://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf) 18 | * [Implementing FXAA](http://blog.simonrodriguez.fr/articles/2016/07/implementing_fxaa.html) 19 | -------------------------------------------------------------------------------- /manual/content/demos/anti-aliasing/msaa.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: MSAA 5 | draft: false 6 | menu: 7 | demos: 8 | parent: anti-aliasing 9 | weight: 10 10 | script: msaa 11 | --- 12 | 13 | # Multisample Anti-Aliasing 14 | 15 | ### External Resources 16 | 17 | * [Learn OpenGL - Anti Aliasing](https://learnopengl.com/Advanced-OpenGL/Anti-Aliasing) 18 | * [ARM Documentation](https://developer.arm.com/documentation/102479/0100/Multi-sample-anti-aliasing) 19 | * [Multisample Anti-Aliasing Rasterization Rules](https://docs.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-rasterizer-stage-rules#multisample-anti-aliasing-rasterization-rules) 20 | * [Interpolation qualifiers](https://www.khronos.org/opengl/wiki/Type_Qualifier_\(GLSL\)#Interpolation_qualifiers) 21 | -------------------------------------------------------------------------------- /manual/content/demos/anti-aliasing/smaa.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: SMAA 5 | draft: false 6 | menu: 7 | demos: 8 | parent: anti-aliasing 9 | weight: 20 10 | script: smaa 11 | --- 12 | 13 | # Subpixel Morphological Anti-Aliasing 14 | 15 | ### External Resources 16 | 17 | * [iryoku/smaa](https://github.com/iryoku/smaa) 18 | -------------------------------------------------------------------------------- /manual/content/demos/color-grading/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: section 3 | collection: sections 4 | title: Color Grading 5 | draft: false 6 | menu: 7 | demos: 8 | title: Color Grading 9 | identifier: color-grading 10 | weight: 20 11 | --- 12 | -------------------------------------------------------------------------------- /manual/content/demos/color-grading/brightness-contrast.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Brightness and Contrast 5 | draft: false 6 | menu: 7 | demos: 8 | parent: color-grading 9 | weight: 20 10 | script: brightness-contrast 11 | --- 12 | 13 | # Brightness & Contrast 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/color-grading/hue-saturation.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Hue and Saturation 5 | draft: false 6 | menu: 7 | demos: 8 | parent: color-grading 9 | weight: 20 10 | script: hue-saturation 11 | --- 12 | 13 | # Hue & Saturation 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/color-grading/lut.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: LUT 5 | draft: false 6 | menu: 7 | demos: 8 | parent: color-grading 9 | weight: 40 10 | script: lut 11 | --- 12 | 13 | # Color Grading: LUT 14 | 15 | ### External Resources 16 | 17 | * [Using Lookup Tables to Accelerate Color Transformations](https://developer.nvidia.com/gpugems/gpugems2/part-iii-high-quality-rendering/chapter-24-using-lookup-tables-accelerate-color) 18 | * [Real-Time Color Space Conversion for High Resolution Video](https://www.nvidia.com/content/GTC/posters/2010/V01-Real-Time-Color-Space-Conversion-for-High-Resolution-Video.pdf) 19 | -------------------------------------------------------------------------------- /manual/content/demos/color-grading/sepia.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Sepia 5 | draft: false 6 | menu: 7 | demos: 8 | parent: color-grading 9 | weight: 50 10 | script: sepia 11 | --- 12 | 13 | # Sepia 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/color-grading/tone-mapping.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Tone Mapping 5 | draft: false 6 | menu: 7 | demos: 8 | parent: color-grading 9 | weight: 60 10 | script: tone-mapping 11 | --- 12 | 13 | # Tone Mapping 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/light-shadow/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: section 3 | collection: sections 4 | title: Light & Shadow 5 | draft: false 6 | menu: 7 | demos: 8 | title: Light & Shadow 9 | identifier: light-shadow 10 | weight: 40 11 | --- 12 | -------------------------------------------------------------------------------- /manual/content/demos/light-shadow/bloom.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Bloom 5 | draft: false 6 | menu: 7 | demos: 8 | parent: light-shadow 9 | weight: 10 10 | script: bloom 11 | --- 12 | 13 | # Bloom 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/light-shadow/god-rays.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | draft: false 5 | title: God Rays 6 | menu: 7 | demos: 8 | parent: light-shadow 9 | weight: 20 10 | script: god-rays 11 | --- 12 | 13 | # God Rays 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/light-shadow/ssao.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: SSAO 5 | draft: false 6 | menu: 7 | demos: 8 | parent: light-shadow 9 | weight: 100 10 | script: ssao 11 | --- 12 | 13 | # Screen Space Ambient Occlusion 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: section 3 | collection: sections 4 | title: Special Effects 5 | draft: false 6 | menu: 7 | demos: 8 | title: Special Effects 9 | identifier: special-effects 10 | weight: 30 11 | --- 12 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/ascii.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: ASCII 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 9 10 | script: ascii 11 | --- 12 | 13 | # ASCII 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/chromatic-aberration.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Chromatic Aberration 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 10 10 | script: chromatic-aberration 11 | --- 12 | 13 | # Chromatic Aberration 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/color-depth.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Color Depth 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 20 10 | script: color-depth 11 | --- 12 | 13 | # Color Depth 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/depth-of-field.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Depth of Field 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 30 10 | script: depth-of-field 11 | --- 12 | 13 | # Depth of Field 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/dot-screen.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Dot Screen 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 40 10 | script: dot-screen 11 | --- 12 | 13 | # Dot Screen / Halftone 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/glitch.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Glitch 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 50 10 | script: glitch 11 | --- 12 | 13 | # Glitch 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/grid.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Grid 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 60 10 | script: grid 11 | --- 12 | 13 | # Grid 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/noise.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Noise 5 | draft: true 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 70 10 | script: noise 11 | --- 12 | 13 | # Noise 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/pixelation.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Pixelation 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 80 10 | script: pixelation 11 | --- 12 | 13 | # Pixelation 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/scanlines.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Scanlines 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 100 10 | script: scanlines 11 | --- 12 | 13 | # Scanlines 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/shock-wave.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Shock Wave 5 | draft: true 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 100 10 | script: shock-wave 11 | --- 12 | 13 | # Shock Wave 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/tilt-shift.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Tilt Shift 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 90 10 | script: tilt-shift 11 | --- 12 | 13 | # Tilt Shift 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/special-effects/vignette.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Vignette 5 | draft: false 6 | menu: 7 | demos: 8 | parent: special-effects 9 | weight: 110 10 | script: vignette 11 | --- 12 | 13 | # Vignette 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/utility/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: section 3 | collection: sections 4 | title: Utility 5 | draft: false 6 | menu: 7 | demos: 8 | title: Utility 9 | identifier: utility 10 | weight: 100 11 | --- 12 | -------------------------------------------------------------------------------- /manual/content/demos/utility/blur.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Blur 5 | draft: false 6 | menu: 7 | demos: 8 | parent: utility 9 | weight: 10 10 | script: blur 11 | --- 12 | 13 | # Blur 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/utility/depth-picking.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Depth Picking 5 | draft: false 6 | menu: 7 | demos: 8 | parent: utility 9 | weight: 10 10 | script: depth-picking 11 | --- 12 | 13 | # Depth Picking 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/utility/outline.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Outline 5 | draft: false 6 | menu: 7 | demos: 8 | parent: utility 9 | weight: 30 10 | script: outline 11 | --- 12 | 13 | # Outline 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/utility/texture.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Texture 5 | draft: false 6 | menu: 7 | demos: 8 | parent: utility 9 | weight: 40 10 | script: texture 11 | --- 12 | 13 | # Texture 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/demos/utility/tone-mapping.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Tone Mapping 5 | draft: true 6 | menu: 7 | demos: 8 | parent: utility 9 | weight: 90 10 | script: tone-mapping 11 | --- 12 | 13 | # Tone Mapping 14 | 15 | ### External Resources 16 | -------------------------------------------------------------------------------- /manual/content/migration-guide.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | collection: sections 4 | title: Migration Guide 5 | draft: false 6 | menu: main 7 | weight: 50 8 | --- 9 | 10 | # Migration Guide 11 | 12 | ## v6 → v7 13 | 14 | WIP 15 | -------------------------------------------------------------------------------- /manual/i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "dateFormat": { 3 | "other": "Jan 2, 2006" 4 | }, 5 | "skipToContent": { 6 | "other": "Skip to content" 7 | }, 8 | "readMore": { 9 | "other": "Read more" 10 | }, 11 | "openNav": { 12 | "other": "Open navigation menu" 13 | }, 14 | "closeNav": { 15 | "other": "Close navigation menu" 16 | }, 17 | "archive": { 18 | "other": "Archive" 19 | }, 20 | "main": { 21 | "other": "Start" 22 | }, 23 | "demos": { 24 | "other": "Demos" 25 | }, 26 | "community": { 27 | "other": "Community" 28 | }, 29 | "loading": { 30 | "other": "loading" 31 | }, 32 | "fullscreen": { 33 | "other": "Fullscreen" 34 | }, 35 | "code": { 36 | "other": "Code" 37 | }, 38 | "info": { 39 | "other": "Info" 40 | }, 41 | "continue": { 42 | "other": "Continue" 43 | }, 44 | "error": { 45 | "other": "Error" 46 | }, 47 | "warning": { 48 | "other": "Warning" 49 | }, 50 | "epilepsyWarning": { 51 | "other": "The following contains flashing imagery that may cause discomfort and/or seizures for those with photosensitive epilepsy." 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /manual/layouts/_default/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | 2 | {{ .Text | safeHTML }} ¶ 3 | 4 | -------------------------------------------------------------------------------- /manual/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "title" }} 2 | {{ i18n "archive" . }} · {{ .Title }} 3 | {{ end }} 4 | 5 | {{ define "main" }} 6 | 7 | {{ i18n "archive" . }}: {{ .Title }} 8 | {{ .Content }} 9 | 10 | {{ partial "contents.html" . }} 11 | {{ partial "pagination.html" . }} 12 | 13 | {{ end }} 14 | -------------------------------------------------------------------------------- /manual/layouts/_default/section.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | 3 | {{ .Title }} 4 | {{ .Content }} 5 | 6 | {{ partial "contents.html" . }} 7 | {{ partial "pagination.html" . }} 8 | 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /manual/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "scripts" }} 2 | 3 | {{ with .Params.script }} 4 | {{ with resources.Get (printf "js/dist/demos/%s.js" .) }} 5 | {{ $script := . | fingerprint }} 6 | 7 | {{ end }} 8 | {{ end }} 9 | 10 | {{ end }} 11 | 12 | {{ define "main" }} 13 | 14 | {{ .Content }} 15 | 16 | {{ end }} 17 | -------------------------------------------------------------------------------- /manual/layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | 3 | {{ .Content }} 4 | 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /manual/layouts/partials/contents.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ $paginate := .Site.Params.paginate }} 4 | {{ with .Params.paginate }} 5 | {{ $paginate = . }} 6 | {{ end }} 7 | 8 | {{ $section := .Section }} 9 | {{ $paginator := .Paginate .Pages $paginate }} 10 | {{ range $paginator.Pages }} 11 | {{ .Scratch.Set "section" $section }} 12 | 13 | {{ .Title }} 14 | 15 | {{ end }} 16 | 17 | 18 | -------------------------------------------------------------------------------- /manual/layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /manual/layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ .Site.Title }} 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /manual/layouts/partials/menu-item.html: -------------------------------------------------------------------------------- 1 | {{ $currentPage := .currentPage }} 2 | {{ $menuName := .menuName }} 3 | 4 | {{ $class := slice }} 5 | {{ with .context.Page }} 6 | {{ if ne .RelPermalink "/" }} 7 | {{ $class = $class | append (path.Base .RelPermalink) }} 8 | {{ end }} 9 | {{ end }} 10 | {{ if $currentPage.IsMenuCurrent $menuName .context }} 11 | {{ $class = $class | append "active" }} 12 | {{ end }} 13 | 14 | 15 | 16 | {{ .context.Pre }} 17 | 18 | {{ $name := .context.Name }} 19 | {{ with .context.Page }} 20 | {{ with .Params.icon }} 21 | {{ $icon := resources.Get . }} 22 | 23 | {{ end }} 24 | {{ end }} 25 | 26 | {{ .context.Name }} 27 | 28 | {{ .context.Post }} 29 | 30 | 31 | -------------------------------------------------------------------------------- /manual/layouts/partials/menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ $currentPage := .currentPage }} 4 | {{ $menuName := .menuName }} 5 | 6 | {{ range .menu }} 7 | {{ if .HasChildren }} 8 | 9 | {{ $class := slice (path.Base .URL) }} 10 | {{ if $currentPage.HasMenuCurrent $menuName . }} 11 | {{ $class = $class | append "active" }} 12 | {{ end }} 13 | 14 | 15 | {{ .Name }} 16 | 17 | {{ range .Children }} 18 | {{ partial "menu-item.html" (dict "context" . "currentPage" $currentPage "menuName" $menuName) }} 19 | {{ end }} 20 | 21 | 22 | 23 | {{ else }} 24 | 25 | {{ partial "menu-item.html" (dict "context" . "currentPage" $currentPage "menuName" $menuName) }} 26 | 27 | {{ end }} 28 | {{ end }} 29 | 30 | 31 | -------------------------------------------------------------------------------- /manual/layouts/partials/navigation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ $currentPage := . }} 4 | {{ range $menuName := .Site.Params.sidebarMenus }} 5 | 6 | {{ i18n $menuName . }} 7 | {{ $menu := index $.Site.Menus $menuName }} 8 | {{ partial "menu.html" (dict "currentPage" $currentPage "menu" $menu "menuName" $menuName) }} 9 | 10 | {{ end }} 11 | 12 | 13 | -------------------------------------------------------------------------------- /manual/layouts/partials/viewport.html: -------------------------------------------------------------------------------- 1 | {{ if .Params.script }} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{ $src := printf "%s/assets/js/src/demos/%s.js" .Site.Params.ManualURL .Params.script }} 13 | 14 | 15 | 16 | 17 | 18 | 19 | {{ i18n "warning" . }} 20 | {{ i18n "epilepsyWarning" . }} 21 | {{ i18n "continue" . }} 22 | 23 | 24 | {{ i18n "error" . }} 25 | 26 | 27 | 28 | {{ end }} 29 | -------------------------------------------------------------------------------- /manual/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | const autoprefixer = require("autoprefixer"); 2 | const cssnano = require("cssnano"); 3 | const postcssPresetEnv = require("postcss-preset-env"); 4 | 5 | module.exports = { 6 | plugins: [ 7 | autoprefixer(), 8 | cssnano(), 9 | postcssPresetEnv() 10 | ] 11 | }; 12 | -------------------------------------------------------------------------------- /manual/static/fonts/roboto-v20-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/fonts/roboto-v20-latin-300.woff -------------------------------------------------------------------------------- /manual/static/fonts/roboto-v20-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/fonts/roboto-v20-latin-300.woff2 -------------------------------------------------------------------------------- /manual/static/fonts/roboto-v20-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/fonts/roboto-v20-latin-regular.woff -------------------------------------------------------------------------------- /manual/static/fonts/roboto-v20-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/fonts/roboto-v20-latin-regular.woff2 -------------------------------------------------------------------------------- /manual/static/img/svg/LICENSE.md: -------------------------------------------------------------------------------- 1 | https://github.com/google/material-design-icons 2 | google/material-design-icons is licensed under the Apache License 2.0. 3 | -------------------------------------------------------------------------------- /manual/static/img/svg/chevron_left_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/chevron_left_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/code_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/code_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/dark_mode_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/dark_mode_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/error_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/error_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/fullscreen_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/fullscreen_exit_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/fullscreen_exit_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/fullscreen_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/github_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/github_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/heart_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/heart_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/keyboard_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/keyboard_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/menu_open_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/menu_open_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/mouse_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/mouse_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/open_in_new_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/open_in_new_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/patreon_black_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /manual/static/img/svg/patreon_white_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /manual/static/img/svg/warning_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/svg/warning_white_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /manual/static/img/textures/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2022 Raoul van Rüschen 2 | 3 | This work is licensed under the Creative Commons Attribution 4.0 International License unless specified otherwise. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 4 | -------------------------------------------------------------------------------- /manual/static/img/textures/lens-dirt/LICENSE.md: -------------------------------------------------------------------------------- 1 | "Lens Dirt" by Javert Valbarr (https://www.inscapedigital.com/lens-dirt). Licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 2 | -------------------------------------------------------------------------------- /manual/static/img/textures/lens-dirt/scratches.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lens-dirt/scratches.jpg -------------------------------------------------------------------------------- /manual/static/img/textures/lut/LICENSE.md: -------------------------------------------------------------------------------- 1 | "LUT Table Pack" (PNG) by Tom Shannon. No license specified. 2 | https://forums.unrealengine.com/community/community-content-tools-and-tutorials/19151-lut-table-pack?48641-LUT-Table-Pack= 3 | 4 | "Free LUTs Cinematic" (Cube & 3DL) by Presetpro. No license specified. 5 | https://www.freepresets.com/product/free-luts-cinematic/ 6 | 7 | "35 Free LUTs for Color Grading Videos" (Cube) by Rocketstock. No license specified. 8 | https://www.rocketstock.com/free-after-effects-templates/35-free-luts-for-color-grading-videos/ 9 | -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/bleach-bypass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/bleach-bypass.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/candle-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/candle-light.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/cool-contrast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/cool-contrast.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/desaturated-fog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/desaturated-fog.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/evening.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/evening.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/fall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/fall.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/filmic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/filmic1.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/filmic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/filmic2.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/matrix-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/matrix-green.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/strong-amber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/strong-amber.png -------------------------------------------------------------------------------- /manual/static/img/textures/lut/png/warm-contrast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/lut/png/warm-contrast.png -------------------------------------------------------------------------------- /manual/static/img/textures/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/pattern.png -------------------------------------------------------------------------------- /manual/static/img/textures/perturb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/perturb.jpg -------------------------------------------------------------------------------- /manual/static/img/textures/photos/GEDC0053.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/photos/GEDC0053.jpg -------------------------------------------------------------------------------- /manual/static/img/textures/skies/cloudy/nx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/cloudy/nx.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/cloudy/ny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/cloudy/ny.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/cloudy/nz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/cloudy/nz.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/cloudy/px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/cloudy/px.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/cloudy/py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/cloudy/py.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/cloudy/pz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/cloudy/pz.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/sunset/nx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/sunset/nx.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/sunset/ny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/sunset/ny.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/sunset/nz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/sunset/nz.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/sunset/px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/sunset/px.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/sunset/py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/sunset/py.png -------------------------------------------------------------------------------- /manual/static/img/textures/skies/sunset/pz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/img/textures/skies/sunset/pz.png -------------------------------------------------------------------------------- /manual/static/models/rigged-simple/LICENSE.md: -------------------------------------------------------------------------------- 1 | Donated by [Cesium](http://cesiumjs.org/) for glTF testing. 2 | 3 | This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 4 | -------------------------------------------------------------------------------- /manual/static/models/rigged-simple/RiggedSimple0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/manual/static/models/rigged-simple/RiggedSimple0.bin -------------------------------------------------------------------------------- /src/core/Disposable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The Disposable contract. 3 | * 4 | * Implemented by objects that can free internal resources. 5 | * 6 | * @interface 7 | */ 8 | 9 | export class Disposable { 10 | 11 | /** 12 | * Frees internal resources. 13 | */ 14 | 15 | dispose() {} 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/core/ImmutableTimer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A timer that provides read access to time data. 3 | * 4 | * @interface 5 | */ 6 | 7 | export class ImmutableTimer { 8 | 9 | /** 10 | * The current delta time in seconds. 11 | * 12 | * @type {Number} 13 | */ 14 | 15 | getDelta() { return NaN; } 16 | 17 | /** 18 | * The elapsed time in seconds. 19 | * 20 | * @type {Number} 21 | */ 22 | 23 | getElapsed() { return NaN; } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/core/Initializable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The initializable contract. 3 | * 4 | * Implemented by objects that can be initialized. 5 | * 6 | * @interface 7 | */ 8 | 9 | export class Initializable { 10 | 11 | /** 12 | * Performs initialization tasks. 13 | * 14 | * @param {WebGLRenderer} renderer - A renderer. 15 | * @param {Boolean} alpha - Whether the renderer uses the alpha channel. 16 | * @param {Number} frameBufferType - The type of the main frame buffers. 17 | */ 18 | 19 | initialize(renderer, alpha, frameBufferType) {} 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/core/Resizable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The Resizable contract. 3 | * 4 | * Implemented by objects that can be resized. 5 | * 6 | * @interface 7 | */ 8 | 9 | export class Resizable { 10 | 11 | /** 12 | * Sets the size of this object. 13 | * 14 | * @param {Number} width - The width. 15 | * @param {Number} height - The height. 16 | */ 17 | 18 | setSize(width, height) {} 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/core/index.js: -------------------------------------------------------------------------------- 1 | export * from "./Disposable.js"; 2 | export * from "./EffectComposer.js"; 3 | export * from "./EffectShaderData.js"; 4 | export * from "./GaussKernel.js"; 5 | export * from "./ImmutableTimer.js"; 6 | export * from "./Initializable.js"; 7 | export * from "./OverrideMaterialManager.js"; 8 | export * from "./Resizable.js"; 9 | export * from "./Resolution.js"; 10 | export * from "./Selection.js"; 11 | export * from "./Timer.js"; 12 | 13 | /** @deprecated Renamed to Resolution. */ 14 | export { Resolution as Resizer } from "./Resolution.js"; 15 | -------------------------------------------------------------------------------- /src/effects/ColorAverageEffect.js: -------------------------------------------------------------------------------- 1 | import { Effect } from "./Effect.js"; 2 | 3 | import fragmentShader from "./glsl/color-average.frag"; 4 | 5 | /** 6 | * A fast greyscale effect. 7 | */ 8 | 9 | export class ColorAverageEffect extends Effect { 10 | 11 | /** 12 | * Constructs a new color average effect. 13 | * 14 | * @param {BlendFunction} [blendFunction] - The blend function of this effect. 15 | */ 16 | 17 | constructor(blendFunction) { 18 | 19 | super("ColorAverageEffect", fragmentShader, { blendFunction }); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/effects/GammaCorrectionEffect.js: -------------------------------------------------------------------------------- 1 | import { Uniform } from "three"; 2 | import { BlendFunction } from "../enums/BlendFunction.js"; 3 | import { Effect } from "./Effect.js"; 4 | 5 | import fragmentShader from "./glsl/gamma-correction.frag"; 6 | 7 | /** 8 | * A gamma correction effect. 9 | * 10 | * @deprecated Set WebGLRenderer.outputEncoding to sRGBEncoding instead. 11 | */ 12 | 13 | export class GammaCorrectionEffect extends Effect { 14 | 15 | /** 16 | * Constructs a new gamma correction effect. 17 | * 18 | * @param {Object} [options] - The options. 19 | * @param {BlendFunction} [options.blendFunction=BlendFunction.SRC] - The blend function of this effect. 20 | * @param {Number} [options.gamma=2.0] - The gamma factor. 21 | */ 22 | 23 | constructor({ blendFunction = BlendFunction.SRC, gamma = 2.0 } = {}) { 24 | 25 | super("GammaCorrectionEffect", fragmentShader, { 26 | blendFunction, 27 | uniforms: new Map([ 28 | ["gamma", new Uniform(gamma)] 29 | ]) 30 | }); 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/add.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, x + y, opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/alpha.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, y, min(y.a, opacity)); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/average.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, (x + y) * 0.5, opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/color-burn.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec4 z = mix(step(0.0, y) * (1.0 - min(vec4(1.0), (1.0 - x) / y)), vec4(1.0), step(1.0, x)); 4 | return mix(x, z, opacity); 5 | 6 | } 7 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/color-dodge.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec4 z = step(0.0, x) * mix(min(vec4(1.0), x / max(1.0 - y, 1e-9)), vec4(1.0), step(1.0, y)); 4 | return mix(x, z, opacity); 5 | 6 | } 7 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/color.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec3 xHSL = RGBToHSL(x.rgb); 4 | vec3 yHSL = RGBToHSL(y.rgb); 5 | vec3 z = HSLToRGB(vec3(yHSL.rg, xHSL.b)); 6 | return vec4(mix(x.rgb, z, opacity), y.a); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/darken.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, min(x, y), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/difference.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, abs(x - y), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/divide.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, x / max(y, 1e-12), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/exclusion.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, (x + y - 2.0 * x * y), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/hard-light.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec4 a = min(x, 1.0), b = min(y, 1.0); 4 | vec4 z = mix(2.0 * a * b, 1.0 - 2.0 * (1.0 - a) * (1.0 - b), step(0.5, y)); 5 | return mix(x, z, opacity); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/hard-mix.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, step(1.0, x + y), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/hue.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec3 xHSL = RGBToHSL(x.rgb); 4 | vec3 yHSL = RGBToHSL(y.rgb); 5 | vec3 z = HSLToRGB(vec3(yHSL.r, xHSL.gb)); 6 | return vec4(mix(x.rgb, z, opacity), y.a); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/invert-rgb.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, y * (1.0 - x), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/invert.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, 1.0 - y, opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/lighten.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, max(x, y), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/linear-burn.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, clamp(y + x - 1.0, 0.0, 1.0), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/linear-dodge.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, min(x + y, 1.0), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/linear-light.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, clamp(2.0 * y + x - 1.0, 0.0, 1.0), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/luminosity.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec3 xHSL = RGBToHSL(x.rgb); 4 | vec3 yHSL = RGBToHSL(y.rgb); 5 | vec3 z = HSLToRGB(vec3(xHSL.rg, yHSL.b)); 6 | return vec4(mix(x.rgb, z, opacity), y.a); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/multiply.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, x * y, opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/negation.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, 1.0 - abs(1.0 - x - y), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/normal.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, y, opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/overlay.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec4 z = mix(2.0 * y * x, 1.0 - 2.0 * (1.0 - y) * (1.0 - x), step(0.5, x)); 4 | return mix(x, z, opacity); 5 | 6 | } 7 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/pin-light.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec4 y2 = 2.0 * y; 4 | 5 | vec4 z = mix( 6 | mix(y2, x, step(0.5 * x, y)), 7 | max(vec4(0.0), y2 - 1.0), 8 | step(x, (y2 - 1.0)) 9 | ); 10 | 11 | return mix(x, z, opacity); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/reflect.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec4 z = mix(min(x * x / max(1.0 - y, 1e-12), 1.0), y, step(1.0, y)); 4 | return mix(x, z, opacity); 5 | 6 | } 7 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/saturation.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec3 xHSL = RGBToHSL(x.rgb); 4 | vec3 yHSL = RGBToHSL(y.rgb); 5 | vec3 z = HSLToRGB(vec3(xHSL.r, yHSL.g, xHSL.b)); 6 | return vec4(mix(x.rgb, z, opacity), y.a); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/screen.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, x + y - min(x * y, 1.0), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/soft-light.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec4 y2 = 2.0 * y; 4 | vec4 w = step(0.5, y); 5 | 6 | vec4 z = mix( 7 | x - (1.0 - y2) * x * (1.0 - x), 8 | mix( 9 | x + (y2 - 1.0) * (sqrt(x) - x), 10 | x + (y2 - 1.0) * x * ((16.0 * x - 12.0) * x + 3.0), 11 | w * (1.0 - step(0.25, x)) 12 | ), 13 | w 14 | ); 15 | 16 | return mix(x, z, opacity); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/src.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return y; 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/subtract.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | return mix(x, max(x + y - 1.0, 0.0), opacity); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/blending/glsl/vivid-light.frag: -------------------------------------------------------------------------------- 1 | vec4 blend(const in vec4 x, const in vec4 y, const in float opacity) { 2 | 3 | vec4 z = mix( 4 | max(1.0 - min((1.0 - x) / (2.0 * y), 1.0), 0.0), 5 | min(x / (2.0 * (1.0 - y)), 1.0), 6 | step(0.5, y) 7 | ); 8 | 9 | return mix(x, z, opacity); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/effects/blending/index.js: -------------------------------------------------------------------------------- 1 | export * from "./BlendMode.js"; 2 | -------------------------------------------------------------------------------- /src/effects/glsl/bloom.frag: -------------------------------------------------------------------------------- 1 | #ifdef FRAMEBUFFER_PRECISION_HIGH 2 | 3 | uniform mediump sampler2D map; 4 | 5 | #else 6 | 7 | uniform lowp sampler2D map; 8 | 9 | #endif 10 | 11 | uniform float intensity; 12 | 13 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 14 | 15 | vec4 texel = texture2D(map, uv); 16 | outputColor = vec4(texel.rgb * intensity, texel.a); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/effects/glsl/brightness-contrast.frag: -------------------------------------------------------------------------------- 1 | uniform float brightness; 2 | uniform float contrast; 3 | 4 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 5 | 6 | vec3 color = inputColor.rgb + vec3(brightness - 0.5); 7 | 8 | if(contrast > 0.0) { 9 | 10 | color /= vec3(1.0 - contrast); 11 | 12 | } else { 13 | 14 | color *= vec3(1.0 + contrast); 15 | 16 | } 17 | 18 | outputColor = vec4(color + vec3(0.5), inputColor.a); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/effects/glsl/chromatic-aberration.frag: -------------------------------------------------------------------------------- 1 | #ifdef RADIAL_MODULATION 2 | 3 | uniform float modulationOffset; 4 | 5 | #endif 6 | 7 | varying float vActive; 8 | varying vec2 vUvR; 9 | varying vec2 vUvB; 10 | 11 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 12 | 13 | vec2 ra = inputColor.ra; 14 | vec2 ba = inputColor.ba; 15 | 16 | #ifdef RADIAL_MODULATION 17 | 18 | const vec2 center = vec2(0.5); 19 | float d = distance(uv, center) * 2.0; 20 | d = max(d - modulationOffset, 0.0); 21 | 22 | if(vActive > 0.0 && d > 0.0) { 23 | 24 | ra = texture2D(inputBuffer, mix(uv, vUvR, d)).ra; 25 | ba = texture2D(inputBuffer, mix(uv, vUvB, d)).ba; 26 | 27 | } 28 | 29 | #else 30 | 31 | if(vActive > 0.0) { 32 | 33 | ra = texture2D(inputBuffer, vUvR).ra; 34 | ba = texture2D(inputBuffer, vUvB).ba; 35 | 36 | } 37 | 38 | #endif 39 | 40 | outputColor = vec4(ra.x, inputColor.g, ba.x, max(max(ra.y, ba.y), inputColor.a)); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/effects/glsl/chromatic-aberration.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 offset; 2 | 3 | varying float vActive; 4 | varying vec2 vUvR; 5 | varying vec2 vUvB; 6 | 7 | void mainSupport(const in vec2 uv) { 8 | 9 | vec2 shift = offset * vec2(1.0, aspect); 10 | vActive = (shift.x != 0.0 || shift.y != 0.0) ? 1.0 : 0.0; 11 | vUvR = uv + shift; 12 | vUvB = uv - shift; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/effects/glsl/color-average.frag: -------------------------------------------------------------------------------- 1 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 2 | 3 | outputColor = vec4(vec3(average(inputColor.rgb)), inputColor.a); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/effects/glsl/color-depth.frag: -------------------------------------------------------------------------------- 1 | uniform float factor; 2 | 3 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 4 | 5 | outputColor = vec4(floor(inputColor.rgb * factor + 0.5) / factor, inputColor.a); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/effects/glsl/depth.frag: -------------------------------------------------------------------------------- 1 | void mainImage(const in vec4 inputColor, const in vec2 uv, const in float depth, out vec4 outputColor) { 2 | 3 | #ifdef INVERTED 4 | 5 | vec3 color = vec3(1.0 - depth); 6 | 7 | #else 8 | 9 | vec3 color = vec3(depth); 10 | 11 | #endif 12 | 13 | outputColor = vec4(color, inputColor.a); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/effects/glsl/dot-screen.frag: -------------------------------------------------------------------------------- 1 | uniform vec2 angle; 2 | uniform float scale; 3 | 4 | float pattern(const in vec2 uv) { 5 | 6 | vec2 point = scale * vec2( 7 | dot(angle.yx, vec2(uv.x, -uv.y)), 8 | dot(angle, uv) 9 | ); 10 | 11 | return (sin(point.x) * sin(point.y)) * 4.0; 12 | 13 | } 14 | 15 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 16 | 17 | vec3 color = vec3(inputColor.rgb * 10.0 - 5.0 + pattern(uv * resolution)); 18 | outputColor = vec4(color, inputColor.a); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/effects/glsl/fxaa.vert: -------------------------------------------------------------------------------- 1 | varying vec2 vUvDown; 2 | varying vec2 vUvUp; 3 | varying vec2 vUvLeft; 4 | varying vec2 vUvRight; 5 | 6 | varying vec2 vUvDownLeft; 7 | varying vec2 vUvUpRight; 8 | varying vec2 vUvUpLeft; 9 | varying vec2 vUvDownRight; 10 | 11 | void mainSupport(const in vec2 uv) { 12 | 13 | vUvDown = uv + vec2(0.0, -1.0) * texelSize; 14 | vUvUp = uv + vec2(0.0, 1.0) * texelSize; 15 | vUvRight = uv + vec2(1.0, 0.0) * texelSize; 16 | vUvLeft = uv + vec2(-1.0, 0.0) * texelSize; 17 | 18 | vUvDownLeft = uv + vec2(-1.0, -1.0) * texelSize; 19 | vUvUpRight = uv + vec2(1.0, 1.0) * texelSize; 20 | vUvUpLeft = uv + vec2(-1.0, 1.0) * texelSize; 21 | vUvDownRight = uv + vec2(1.0, -1.0) * texelSize; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/effects/glsl/gamma-correction.frag: -------------------------------------------------------------------------------- 1 | uniform float gamma; 2 | 3 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 4 | 5 | outputColor = LinearToGamma(max(inputColor, 0.0), gamma); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/effects/glsl/glitch.frag: -------------------------------------------------------------------------------- 1 | uniform lowp sampler2D perturbationMap; 2 | 3 | uniform bool active; 4 | uniform float columns; 5 | uniform float random; 6 | uniform vec2 seeds; 7 | uniform vec2 distortion; 8 | 9 | void mainUv(inout vec2 uv) { 10 | 11 | if(active) { 12 | 13 | if(uv.y < distortion.x + columns && uv.y > distortion.x - columns * random) { 14 | 15 | float sx = clamp(ceil(seeds.x), 0.0, 1.0); 16 | uv.y = sx * (1.0 - (uv.y + distortion.y)) + (1.0 - sx) * distortion.y; 17 | 18 | } 19 | 20 | if(uv.x < distortion.y + columns && uv.x > distortion.y - columns * random) { 21 | 22 | float sy = clamp(ceil(seeds.y), 0.0, 1.0); 23 | uv.x = sy * distortion.x + (1.0 - sy) * (1.0 - (uv.x + distortion.x)); 24 | 25 | } 26 | 27 | vec2 normal = texture2D(perturbationMap, uv * random * random).rg; 28 | uv += normal * seeds * (random * 0.2); 29 | 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/effects/glsl/god-rays.frag: -------------------------------------------------------------------------------- 1 | #ifdef FRAMEBUFFER_PRECISION_HIGH 2 | 3 | uniform mediump sampler2D map; 4 | 5 | #else 6 | 7 | uniform lowp sampler2D map; 8 | 9 | #endif 10 | 11 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 12 | 13 | outputColor = texture2D(map, uv); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/effects/glsl/grid.frag: -------------------------------------------------------------------------------- 1 | uniform vec2 scale; 2 | uniform float lineWidth; 3 | 4 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 5 | 6 | float grid = 0.5 - max(abs(mod(uv.x * scale.x, 1.0) - 0.5), abs(mod(uv.y * scale.y, 1.0) - 0.5)); 7 | outputColor = vec4(vec3(smoothstep(0.0, lineWidth, grid)), inputColor.a); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/effects/glsl/hue-saturation.frag: -------------------------------------------------------------------------------- 1 | uniform vec3 hue; 2 | uniform float saturation; 3 | 4 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 5 | 6 | // Hue. 7 | vec3 color = vec3( 8 | dot(inputColor.rgb, hue.xyz), 9 | dot(inputColor.rgb, hue.zxy), 10 | dot(inputColor.rgb, hue.yzx) 11 | ); 12 | 13 | // Saturation. 14 | float average = (color.r + color.g + color.b) / 3.0; 15 | vec3 diff = average - color; 16 | 17 | if(saturation > 0.0) { 18 | 19 | color += diff * (1.0 - 1.0 / (1.001 - saturation)); 20 | 21 | } else { 22 | 23 | color += diff * -saturation; 24 | 25 | } 26 | 27 | outputColor = vec4(min(color, 1.0), inputColor.a); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/effects/glsl/lens-distortion.frag: -------------------------------------------------------------------------------- 1 | uniform vec2 distortion; 2 | uniform vec2 principalPoint; 3 | uniform vec2 focalLength; 4 | uniform float skew; 5 | 6 | float mask(const in vec2 uv) { 7 | 8 | return float(uv.s >= 0.0 && uv.s <= 1.0 && uv.t >= 0.0 && uv.t <= 1.0); 9 | 10 | } 11 | 12 | void mainUv(inout vec2 uv) { 13 | 14 | vec2 xn = 2.0 * (uv.st - 0.5); // [-1, 1] 15 | vec3 xDistorted = vec3((1.0 + distortion * dot(xn, xn)) * xn, 1.0); 16 | 17 | mat3 kk = mat3( 18 | vec3(focalLength.x, 0.0, 0.0), 19 | vec3(skew * focalLength.x, focalLength.y, 0.0), 20 | vec3(principalPoint.x, principalPoint.y, 1.0) 21 | ); 22 | 23 | uv = (kk * xDistorted).xy * 0.5 + 0.5; 24 | 25 | } 26 | 27 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 28 | 29 | outputColor = mask(uv) * inputColor; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/effects/glsl/lut-1d.frag: -------------------------------------------------------------------------------- 1 | #ifdef LUT_PRECISION_HIGH 2 | 3 | #ifdef GL_FRAGMENT_PRECISION_HIGH 4 | 5 | uniform highp sampler2D lut; 6 | 7 | #else 8 | 9 | uniform mediump sampler2D lut; 10 | 11 | #endif 12 | 13 | #else 14 | 15 | uniform lowp sampler2D lut; 16 | 17 | #endif 18 | 19 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 20 | 21 | outputColor = vec4( 22 | texture2D(lut, vec2(inputColor.r, 0.5)).r, 23 | texture2D(lut, vec2(inputColor.g, 0.5)).r, 24 | texture2D(lut, vec2(inputColor.b, 0.5)).r, 25 | inputColor.a 26 | ); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/effects/glsl/noise.frag: -------------------------------------------------------------------------------- 1 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 2 | 3 | vec3 noise = vec3(rand(uv * (1.0 + time))); 4 | 5 | #ifdef PREMULTIPLY 6 | 7 | outputColor = vec4(min(inputColor.rgb * noise, vec3(1.0)), inputColor.a); 8 | 9 | #else 10 | 11 | outputColor = vec4(noise, inputColor.a); 12 | 13 | #endif 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/effects/glsl/outline.vert: -------------------------------------------------------------------------------- 1 | uniform float patternScale; 2 | 3 | varying vec2 vUvPattern; 4 | 5 | void mainSupport(const in vec2 uv) { 6 | 7 | vUvPattern = uv * vec2(aspect, 1.0) * patternScale; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/effects/glsl/pixelation.frag: -------------------------------------------------------------------------------- 1 | uniform bool active; 2 | uniform vec4 d; 3 | 4 | void mainUv(inout vec2 uv) { 5 | 6 | if(active) { 7 | 8 | uv = d.xy * (floor(uv * d.zw) + 0.5); 9 | 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/effects/glsl/scanlines.frag: -------------------------------------------------------------------------------- 1 | uniform float count; 2 | 3 | #ifdef SCROLL 4 | 5 | uniform float scrollSpeed; 6 | 7 | #endif 8 | 9 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 10 | 11 | float y = uv.y; 12 | 13 | #ifdef SCROLL 14 | 15 | y += time * scrollSpeed; 16 | 17 | #endif 18 | 19 | vec2 sl = vec2(sin(y * count), cos(y * count)); 20 | outputColor = vec4(sl.xyx, inputColor.a); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/effects/glsl/sepia.frag: -------------------------------------------------------------------------------- 1 | uniform vec3 weightsR; 2 | uniform vec3 weightsG; 3 | uniform vec3 weightsB; 4 | 5 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 6 | 7 | vec3 color = vec3( 8 | dot(inputColor.rgb, weightsR), 9 | dot(inputColor.rgb, weightsG), 10 | dot(inputColor.rgb, weightsB) 11 | ); 12 | 13 | outputColor = vec4(color, inputColor.a); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/effects/glsl/shock-wave.frag: -------------------------------------------------------------------------------- 1 | uniform bool active; 2 | uniform vec2 center; 3 | uniform float waveSize; 4 | uniform float radius; 5 | uniform float maxRadius; 6 | uniform float amplitude; 7 | 8 | varying float vSize; 9 | 10 | void mainUv(inout vec2 uv) { 11 | 12 | if(active) { 13 | 14 | vec2 aspectCorrection = vec2(aspect, 1.0); 15 | vec2 difference = uv * aspectCorrection - center * aspectCorrection; 16 | float distance = sqrt(dot(difference, difference)) * vSize; 17 | 18 | if(distance > radius) { 19 | 20 | if(distance < radius + waveSize) { 21 | 22 | float angle = (distance - radius) * PI2 / waveSize; 23 | float cosSin = (1.0 - cos(angle)) * 0.5; 24 | 25 | float extent = maxRadius + waveSize; 26 | float decay = max(extent - distance * distance, 0.0) / extent; 27 | 28 | uv -= ((cosSin * amplitude * difference) / distance) * decay; 29 | 30 | } 31 | 32 | } 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/effects/glsl/shock-wave.vert: -------------------------------------------------------------------------------- 1 | uniform float size; 2 | uniform float cameraDistance; 3 | 4 | varying float vSize; 5 | 6 | void mainSupport() { 7 | 8 | vSize = (0.1 * cameraDistance) / size; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/effects/glsl/smaa.vert: -------------------------------------------------------------------------------- 1 | varying vec2 vOffset0; 2 | varying vec2 vOffset1; 3 | 4 | void mainSupport(const in vec2 uv) { 5 | 6 | vOffset0 = uv + texelSize * vec2(1.0, 0.0); 7 | vOffset1 = uv + texelSize * vec2(0.0, 1.0); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/effects/glsl/texture.frag: -------------------------------------------------------------------------------- 1 | #ifdef TEXTURE_PRECISION_HIGH 2 | 3 | uniform mediump sampler2D map; 4 | 5 | #else 6 | 7 | uniform lowp sampler2D map; 8 | 9 | #endif 10 | 11 | varying vec2 vUv2; 12 | 13 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 14 | 15 | #ifdef UV_TRANSFORM 16 | 17 | vec4 texel = texture2D(map, vUv2); 18 | 19 | #else 20 | 21 | vec4 texel = texture2D(map, uv); 22 | 23 | #endif 24 | 25 | outputColor = TEXEL; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/effects/glsl/texture.vert: -------------------------------------------------------------------------------- 1 | #ifdef ASPECT_CORRECTION 2 | 3 | uniform float scale; 4 | 5 | #else 6 | 7 | uniform mat3 uvTransform; 8 | 9 | #endif 10 | 11 | varying vec2 vUv2; 12 | 13 | void mainSupport(const in vec2 uv) { 14 | 15 | #ifdef ASPECT_CORRECTION 16 | 17 | vUv2 = uv * vec2(aspect, 1.0) * scale; 18 | 19 | #else 20 | 21 | vUv2 = (uvTransform * vec3(uv, 1.0)).xy; 22 | 23 | #endif 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/effects/glsl/tilt-shift.frag: -------------------------------------------------------------------------------- 1 | #ifdef FRAMEBUFFER_PRECISION_HIGH 2 | 3 | uniform mediump sampler2D map; 4 | 5 | #else 6 | 7 | uniform lowp sampler2D map; 8 | 9 | #endif 10 | 11 | uniform vec2 maskParams; 12 | varying vec2 vUv2; 13 | 14 | float linearGradientMask(const in float x) { 15 | 16 | return step(maskParams.x, x) - step(maskParams.y, x); 17 | 18 | } 19 | 20 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 21 | 22 | float mask = linearGradientMask(vUv2.y); 23 | vec4 texel = texture2D(map, uv); 24 | outputColor = mix(texel, inputColor, mask); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/effects/glsl/tilt-shift.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 rotation; 2 | varying vec2 vUv2; 3 | 4 | void mainSupport(const in vec2 uv) { 5 | 6 | vUv2 = (uv - 0.5) * 2.0 * vec2(aspect, 1.0); 7 | vUv2 = vec2(dot(rotation, vUv2), dot(rotation, vec2(vUv2.y, -vUv2.x))); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/effects/glsl/vignette.frag: -------------------------------------------------------------------------------- 1 | uniform float offset; 2 | uniform float darkness; 3 | 4 | void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { 5 | 6 | const vec2 center = vec2(0.5); 7 | vec3 color = inputColor.rgb; 8 | 9 | #if VIGNETTE_TECHNIQUE == 0 10 | 11 | float d = distance(uv, center); 12 | color *= smoothstep(0.8, offset * 0.799, d * (darkness + offset)); 13 | 14 | #else 15 | 16 | vec2 coord = (uv - center) * vec2(offset); 17 | color = mix(color, vec3(1.0 - darkness), dot(coord, coord)); 18 | 19 | #endif 20 | 21 | outputColor = vec4(color, inputColor.a); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/enums/ColorChannel.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A color channel enumeration. 3 | * 4 | * @type {Object} 5 | * @property {Number} RED - Red. 6 | * @property {Number} GREEN - Green. 7 | * @property {Number} BLUE - Blue. 8 | * @property {Number} ALPHA - Alpha. 9 | */ 10 | 11 | export const ColorChannel = { 12 | RED: 0, 13 | GREEN: 1, 14 | BLUE: 2, 15 | ALPHA: 3 16 | }; 17 | -------------------------------------------------------------------------------- /src/enums/DepthCopyMode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of depth copy modes. 3 | * 4 | * @type {Object} 5 | * @property {Number} FULL - Copies the full depth texture every frame. 6 | * @property {Number} SINGLE - Copies a single texel from the depth texture on demand. 7 | */ 8 | 9 | export const DepthCopyMode = { 10 | FULL: 0, 11 | SINGLE: 1 12 | }; 13 | -------------------------------------------------------------------------------- /src/enums/DepthTestStrategy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of depth test strategies. 3 | * 4 | * @type {Object} 5 | * @property {Number} DEFAULT - Perform depth test only. 6 | * @property {Number} KEEP_MAX_DEPTH - Always keep max depth. 7 | * @property {Number} DISCARD_MAX_DEPTH - Always discard max depth. 8 | */ 9 | 10 | export const DepthTestStrategy = { 11 | DEFAULT: 0, 12 | KEEP_MAX_DEPTH: 1, 13 | DISCARD_MAX_DEPTH: 2 14 | }; 15 | -------------------------------------------------------------------------------- /src/enums/EdgeDetectionMode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of edge detection modes. 3 | * 4 | * @type {Object} 5 | * @property {Number} DEPTH - Depth-based edge detection. 6 | * @property {Number} LUMA - Luminance-based edge detection. 7 | * @property {Number} COLOR - Chroma-based edge detection. 8 | */ 9 | 10 | export const EdgeDetectionMode = { 11 | DEPTH: 0, 12 | LUMA: 1, 13 | COLOR: 2 14 | }; 15 | -------------------------------------------------------------------------------- /src/enums/EffectAttribute.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of effect attributes. 3 | * 4 | * Attributes can be concatenated using the bitwise OR operator. 5 | * 6 | * @type {Object} 7 | * @property {Number} NONE - No attributes. Most effects don't need to specify any attributes. 8 | * @property {Number} DEPTH - Describes effects that require a depth texture. 9 | * @property {Number} CONVOLUTION - Describes effects that fetch additional samples from the input buffer. There cannot be more than one effect with this attribute per {@link EffectPass}. 10 | * @example const attributes = EffectAttribute.CONVOLUTION | EffectAttribute.DEPTH; 11 | */ 12 | 13 | export const EffectAttribute = { 14 | NONE: 0, 15 | DEPTH: 1, 16 | CONVOLUTION: 2 17 | }; 18 | -------------------------------------------------------------------------------- /src/enums/EffectShaderSection.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * An enumeration of effect shader placeholders. 4 | * 5 | * @type {Object} 6 | * @property {String} FRAGMENT_HEAD - A placeholder for function and variable declarations in the fragment shader. 7 | * @property {String} FRAGMENT_MAIN_UV - A placeholder for UV transformations in the fragment shader. 8 | * @property {String} FRAGMENT_MAIN_IMAGE - A placeholder for color calculations in the fragment shader. 9 | * @property {String} VERTEX_HEAD - A placeholder for function and variable declarations in the vertex shader. 10 | * @property {String} VERTEX_MAIN_SUPPORT - A placeholder for supporting calculations in the vertex shader. 11 | */ 12 | 13 | export const EffectShaderSection = { 14 | FRAGMENT_HEAD: "FRAGMENT_HEAD", 15 | FRAGMENT_MAIN_UV: "FRAGMENT_MAIN_UV", 16 | FRAGMENT_MAIN_IMAGE: "FRAGMENT_MAIN_IMAGE", 17 | VERTEX_HEAD: "VERTEX_HEAD", 18 | VERTEX_MAIN_SUPPORT: "VERTEX_MAIN_SUPPORT" 19 | }; 20 | -------------------------------------------------------------------------------- /src/enums/GlitchMode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A glitch mode enumeration. 3 | * 4 | * @type {Object} 5 | * @property {Number} DISABLED - No glitches. 6 | * @property {Number} SPORADIC - Sporadic glitches. 7 | * @property {Number} CONSTANT_MILD - Constant mild glitches. 8 | * @property {Number} CONSTANT_WILD - Constant wild glitches. 9 | */ 10 | 11 | export const GlitchMode = { 12 | DISABLED: 0, 13 | SPORADIC: 1, 14 | CONSTANT_MILD: 2, 15 | CONSTANT_WILD: 3 16 | }; 17 | -------------------------------------------------------------------------------- /src/enums/KernelSize.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of blur kernel sizes. 3 | * 4 | * @type {Object} 5 | * @property {Number} VERY_SMALL - A very small kernel that matches a 7x7 Gaussian blur kernel. 6 | * @property {Number} SMALL - A small kernel that matches a 25x25 Gaussian blur kernel. 7 | * @property {Number} MEDIUM - A medium sized kernel that matches a 63x63 Gaussian blur kernel. 8 | * @property {Number} LARGE - A large kernel that matches a 127x127 Gaussian blur kernel. 9 | * @property {Number} VERY_LARGE - A very large kernel that matches a 391x391 Gaussian blur kernel. 10 | * @property {Number} HUGE - A huge kernel that cannot be replicated with a single Gaussian blur pass. 11 | */ 12 | 13 | export const KernelSize = { 14 | VERY_SMALL: 0, 15 | SMALL: 1, 16 | MEDIUM: 2, 17 | LARGE: 3, 18 | VERY_LARGE: 4, 19 | HUGE: 5 20 | }; 21 | -------------------------------------------------------------------------------- /src/enums/LUTOperation.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of LUT worker operations. 3 | * 4 | * @type {Object} 5 | * @property {String} SCALE_UP - Tetrahedral upscale operation. 6 | */ 7 | 8 | export const LUTOperation = { 9 | SCALE_UP: "lut.scaleup" 10 | }; 11 | -------------------------------------------------------------------------------- /src/enums/MaskFunction.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A mask function enumeration. 3 | * 4 | * @type {Object} 5 | * @property {Number} DISCARD - Discards elements when the respective mask value is zero. 6 | * @property {Number} MULTIPLY - Multiplies the input buffer with the mask texture. 7 | * @property {Number} MULTIPLY_RGB_SET_ALPHA - Multiplies the input RGB values with the mask and sets alpha to the mask value. 8 | * @property {Number} MULTIPLY_RGB - Multiplies the input RGB values with the mask and keeps the original alpha. 9 | */ 10 | 11 | export const MaskFunction = { 12 | DISCARD: 0, 13 | MULTIPLY: 1, 14 | MULTIPLY_RGB_SET_ALPHA: 2, 15 | MULTIPLY_RGB: 3 16 | }; 17 | -------------------------------------------------------------------------------- /src/enums/PredicationMode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of SMAA predication modes. 3 | * 4 | * @type {Object} 5 | * @property {Number} DISABLED - No predicated thresholding. 6 | * @property {Number} DEPTH - Depth-based predicated thresholding. 7 | * @property {Number} CUSTOM - Predicated thresholding using a custom buffer. 8 | */ 9 | 10 | export const PredicationMode = { 11 | DISABLED: 0, 12 | DEPTH: 1, 13 | CUSTOM: 2 14 | }; 15 | -------------------------------------------------------------------------------- /src/enums/SMAAPreset.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of SMAA presets. 3 | * 4 | * @type {Object} 5 | * @property {Number} LOW - Results in around 60% of the maximum quality. 6 | * @property {Number} MEDIUM - Results in around 80% of the maximum quality. 7 | * @property {Number} HIGH - Results in around 95% of the maximum quality. 8 | * @property {Number} ULTRA - Results in around 99% of the maximum quality. 9 | */ 10 | 11 | export const SMAAPreset = { 12 | LOW: 0, 13 | MEDIUM: 1, 14 | HIGH: 2, 15 | ULTRA: 3 16 | }; 17 | -------------------------------------------------------------------------------- /src/enums/VignetteTechnique.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of Vignette techniques. 3 | * 4 | * @type {Object} 5 | * @property {Number} DEFAULT - Produces a dusty look. 6 | * @property {Number} ESKIL - Produces a burned look. 7 | */ 8 | 9 | export const VignetteTechnique = { 10 | DEFAULT: 0, 11 | ESKIL: 1 12 | }; 13 | -------------------------------------------------------------------------------- /src/enums/WebGLExtension.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An enumeration of WebGL extensions. 3 | * 4 | * @type {Object} 5 | * @property {String} DERIVATIVES - Enables derivatives by adding the functions dFdx, dFdy and fwidth. 6 | * @property {String} FRAG_DEPTH - Enables gl_FragDepthEXT to set a depth value of a fragment from within the fragment shader. 7 | * @property {String} DRAW_BUFFERS - Enables multiple render targets (MRT) support. 8 | * @property {String} SHADER_TEXTURE_LOD - Enables explicit control of texture LOD. 9 | */ 10 | 11 | export const WebGLExtension = { 12 | DERIVATIVES: "derivatives", 13 | FRAG_DEPTH: "fragDepth", 14 | DRAW_BUFFERS: "drawBuffers", 15 | SHADER_TEXTURE_LOD: "shaderTextureLOD" 16 | }; 17 | -------------------------------------------------------------------------------- /src/enums/index.js: -------------------------------------------------------------------------------- 1 | export * from "./BlendFunction.js"; 2 | export * from "./ColorChannel.js"; 3 | export * from "./DepthCopyMode.js"; 4 | export * from "./DepthTestStrategy.js"; 5 | export * from "./EdgeDetectionMode.js"; 6 | export * from "./EffectAttribute.js"; 7 | export * from "./EffectShaderSection.js"; 8 | export * from "./GlitchMode.js"; 9 | export * from "./KernelSize.js"; 10 | export * from "./LUTOperation.js"; 11 | export * from "./MaskFunction.js"; 12 | export * from "./PredicationMode.js"; 13 | export * from "./SMAAPreset.js"; 14 | export * from "./ToneMappingMode.js"; 15 | export * from "./VignetteTechnique.js"; 16 | export * from "./WebGLExtension.js"; 17 | 18 | /** @deprecated Renamed to EffectShaderSection. */ 19 | export { EffectShaderSection as Section } from "./EffectShaderSection.js"; 20 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | /** @ignore */ 2 | export { version } from "../package.json"; 3 | 4 | export * from "./core/index.js"; 5 | export * from "./effects/index.js"; 6 | export * from "./enums/index.js"; 7 | export * from "./loaders/index.js"; 8 | export * from "./materials/index.js"; 9 | export * from "./passes/index.js"; 10 | export * from "./textures/index.js"; 11 | -------------------------------------------------------------------------------- /src/loaders/index.js: -------------------------------------------------------------------------------- 1 | export * from "./LUT3dlLoader.js"; 2 | export * from "./LUTCubeLoader.js"; 3 | export * from "./SMAAImageLoader.js"; 4 | -------------------------------------------------------------------------------- /src/materials/glsl/common.vert: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | 3 | void main() { 4 | 5 | vUv = position.xy * 0.5 + 0.5; 6 | gl_Position = vec4(position.xy, 1.0, 1.0); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/materials/glsl/convolution.gaussian.frag: -------------------------------------------------------------------------------- 1 | #ifdef FRAMEBUFFER_PRECISION_HIGH 2 | 3 | uniform mediump sampler2D inputBuffer; 4 | 5 | #else 6 | 7 | uniform lowp sampler2D inputBuffer; 8 | 9 | #endif 10 | 11 | uniform vec2 kernel[STEPS]; 12 | 13 | varying vec2 vOffset; 14 | varying vec2 vUv; 15 | 16 | void main() { 17 | 18 | vec4 result = texture2D(inputBuffer, vUv) * kernel[0].y; 19 | 20 | for(int i = 1; i < STEPS; ++i) { 21 | 22 | vec2 offset = kernel[i].x * vOffset; 23 | vec4 c0 = texture2D(inputBuffer, vUv + offset); 24 | vec4 c1 = texture2D(inputBuffer, vUv - offset); 25 | result += (c0 + c1) * kernel[i].y; 26 | 27 | } 28 | 29 | gl_FragColor = result; 30 | 31 | #include 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/materials/glsl/convolution.gaussian.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 texelSize; 2 | uniform vec2 direction; 3 | uniform float scale; 4 | 5 | varying vec2 vOffset; 6 | varying vec2 vUv; 7 | 8 | void main() { 9 | 10 | vOffset = direction * texelSize * scale; 11 | vUv = position.xy * 0.5 + 0.5; 12 | gl_Position = vec4(position.xy, 1.0, 1.0); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/materials/glsl/convolution.kawase.frag: -------------------------------------------------------------------------------- 1 | #ifdef FRAMEBUFFER_PRECISION_HIGH 2 | 3 | uniform mediump sampler2D inputBuffer; 4 | 5 | #else 6 | 7 | uniform lowp sampler2D inputBuffer; 8 | 9 | #endif 10 | 11 | varying vec2 vUv0; 12 | varying vec2 vUv1; 13 | varying vec2 vUv2; 14 | varying vec2 vUv3; 15 | 16 | void main() { 17 | 18 | vec4 sum = texture2D(inputBuffer, vUv0); // Top left 19 | sum += texture2D(inputBuffer, vUv1); // Top right 20 | sum += texture2D(inputBuffer, vUv2); // Bottom right 21 | sum += texture2D(inputBuffer, vUv3); // Bottom left 22 | gl_FragColor = sum * 0.25; // Compute the average 23 | 24 | #include 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/materials/glsl/convolution.kawase.vert: -------------------------------------------------------------------------------- 1 | uniform vec4 texelSize; // XY = texel size, ZW = half texel size 2 | uniform float kernel; 3 | uniform float scale; 4 | 5 | varying vec2 vUv0; 6 | varying vec2 vUv1; 7 | varying vec2 vUv2; 8 | varying vec2 vUv3; 9 | 10 | void main() { 11 | 12 | vec2 uv = position.xy * 0.5 + 0.5; 13 | vec2 dUv = (texelSize.xy * vec2(kernel) + texelSize.zw) * scale; 14 | 15 | vUv0 = vec2(uv.x - dUv.x, uv.y + dUv.y); 16 | vUv1 = vec2(uv.x + dUv.x, uv.y + dUv.y); 17 | vUv2 = vec2(uv.x + dUv.x, uv.y - dUv.y); 18 | vUv3 = vec2(uv.x - dUv.x, uv.y - dUv.y); 19 | 20 | gl_Position = vec4(position.xy, 1.0, 1.0); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/materials/glsl/convolution.tilt-shift.frag: -------------------------------------------------------------------------------- 1 | #ifdef FRAMEBUFFER_PRECISION_HIGH 2 | 3 | uniform mediump sampler2D inputBuffer; 4 | 5 | #else 6 | 7 | uniform lowp sampler2D inputBuffer; 8 | 9 | #endif 10 | 11 | uniform vec4 maskParams; 12 | 13 | varying vec2 vUv; 14 | varying vec2 vUv2; 15 | varying vec2 vOffset; 16 | 17 | float linearGradientMask(const in float x) { 18 | 19 | return smoothstep(maskParams.x, maskParams.y, x) - 20 | smoothstep(maskParams.w, maskParams.z, x); 21 | 22 | } 23 | 24 | void main() { 25 | 26 | vec2 dUv = vOffset * (1.0 - linearGradientMask(vUv2.y)); 27 | vec4 sum = texture2D(inputBuffer, vec2(vUv.x - dUv.x, vUv.y + dUv.y)); // Top left 28 | sum += texture2D(inputBuffer, vec2(vUv.x + dUv.x, vUv.y + dUv.y)); // Top right 29 | sum += texture2D(inputBuffer, vec2(vUv.x + dUv.x, vUv.y - dUv.y)); // Bottom right 30 | sum += texture2D(inputBuffer, vec2(vUv.x - dUv.x, vUv.y - dUv.y)); // Bottom left 31 | gl_FragColor = sum * 0.25; // Compute the average 32 | 33 | #include 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/materials/glsl/convolution.tilt-shift.vert: -------------------------------------------------------------------------------- 1 | uniform vec4 texelSize; // XY = texel size, ZW = half texel size 2 | uniform float kernel; 3 | uniform float scale; 4 | uniform float aspect; 5 | uniform vec2 rotation; 6 | 7 | varying vec2 vUv; 8 | varying vec2 vUv2; 9 | varying vec2 vOffset; 10 | 11 | void main() { 12 | 13 | vec2 uv = position.xy * 0.5 + 0.5; 14 | 15 | vUv = uv; 16 | vUv2 = (uv - 0.5) * 2.0 * vec2(aspect, 1.0); 17 | vUv2 = vec2(dot(rotation, vUv2), dot(rotation, vec2(vUv2.y, -vUv2.x))); 18 | vOffset = (texelSize.xy * vec2(kernel) + texelSize.zw) * scale; 19 | 20 | gl_Position = vec4(position.xy, 1.0, 1.0); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/materials/glsl/convolution.upsampling.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 texelSize; 2 | 3 | varying vec2 vUv; 4 | varying vec2 vUv0; 5 | varying vec2 vUv1; 6 | varying vec2 vUv2; 7 | varying vec2 vUv3; 8 | varying vec2 vUv4; 9 | varying vec2 vUv5; 10 | varying vec2 vUv6; 11 | varying vec2 vUv7; 12 | 13 | void main() { 14 | 15 | vUv = position.xy * 0.5 + 0.5; 16 | 17 | vUv0 = vUv + texelSize * vec2(-1.0, 1.0); 18 | vUv1 = vUv + texelSize * vec2(0.0, 1.0); 19 | vUv2 = vUv + texelSize * vec2(1.0, 1.0); 20 | vUv3 = vUv + texelSize * vec2(-1.0, 0.0); 21 | 22 | vUv4 = vUv + texelSize * vec2(1.0, 0.0); 23 | vUv5 = vUv + texelSize * vec2(-1.0, -1.0); 24 | vUv6 = vUv + texelSize * vec2(0.0, -1.0); 25 | vUv7 = vUv + texelSize * vec2(1.0, -1.0); 26 | 27 | gl_Position = vec4(position.xy, 1.0, 1.0); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/materials/glsl/copy.frag: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifdef FRAMEBUFFER_PRECISION_HIGH 5 | 6 | uniform mediump sampler2D inputBuffer; 7 | 8 | #else 9 | 10 | uniform lowp sampler2D inputBuffer; 11 | 12 | #endif 13 | 14 | uniform float opacity; 15 | 16 | varying vec2 vUv; 17 | 18 | void main() { 19 | 20 | vec4 texel = texture2D(inputBuffer, vUv); 21 | gl_FragColor = opacity * texel; 22 | 23 | #include 24 | #include 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/materials/glsl/depth-comparison.vert: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | varying float vViewZ; 7 | varying vec4 vProjTexCoord; 8 | 9 | void main() { 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | vViewZ = mvPosition.z; 19 | vProjTexCoord = gl_Position; 20 | 21 | #include 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/materials/glsl/depth-copy.vert: -------------------------------------------------------------------------------- 1 | varying vec2 vUv; 2 | 3 | #if DEPTH_COPY_MODE == 1 4 | 5 | uniform vec2 texelPosition; 6 | 7 | #endif 8 | 9 | void main() { 10 | 11 | #if DEPTH_COPY_MODE == 1 12 | 13 | vUv = texelPosition; 14 | 15 | #else 16 | 17 | vUv = position.xy * 0.5 + 0.5; 18 | 19 | #endif 20 | 21 | gl_Position = vec4(position.xy, 1.0, 1.0); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/materials/glsl/depth-downsampling.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 texelSize; 2 | 3 | varying vec2 vUv0; 4 | varying vec2 vUv1; 5 | varying vec2 vUv2; 6 | varying vec2 vUv3; 7 | 8 | void main() { 9 | 10 | vec2 uv = position.xy * 0.5 + 0.5; 11 | 12 | vUv0 = uv; 13 | vUv1 = vec2(uv.x, uv.y + texelSize.y); 14 | vUv2 = vec2(uv.x + texelSize.x, uv.y); 15 | vUv3 = uv + texelSize; 16 | 17 | gl_Position = vec4(position.xy, 1.0, 1.0); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/materials/glsl/edge-detection.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 texelSize; 2 | 3 | varying vec2 vUv; 4 | varying vec2 vUv0; 5 | varying vec2 vUv1; 6 | 7 | #if EDGE_DETECTION_MODE != 0 8 | 9 | varying vec2 vUv2; 10 | varying vec2 vUv3; 11 | varying vec2 vUv4; 12 | varying vec2 vUv5; 13 | 14 | #endif 15 | 16 | void main() { 17 | 18 | vUv = position.xy * 0.5 + 0.5; 19 | 20 | // Left and top texel coordinates. 21 | vUv0 = vUv + texelSize * vec2(-1.0, 0.0); 22 | vUv1 = vUv + texelSize * vec2(0.0, -1.0); 23 | 24 | #if EDGE_DETECTION_MODE != 0 25 | 26 | // Right and bottom texel coordinates. 27 | vUv2 = vUv + texelSize * vec2(1.0, 0.0); 28 | vUv3 = vUv + texelSize * vec2(0.0, 1.0); 29 | 30 | // Left-left and top-top texel coordinates. 31 | vUv4 = vUv + texelSize * vec2(-2.0, 0.0); 32 | vUv5 = vUv + texelSize * vec2(0.0, -2.0); 33 | 34 | #endif 35 | 36 | gl_Position = vec4(position.xy, 1.0, 1.0); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/materials/glsl/effect.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 resolution; 2 | uniform vec2 texelSize; 3 | 4 | uniform float cameraNear; 5 | uniform float cameraFar; 6 | uniform float aspect; 7 | uniform float time; 8 | 9 | varying vec2 vUv; 10 | 11 | VERTEX_HEAD 12 | 13 | void main() { 14 | 15 | vUv = position.xy * 0.5 + 0.5; 16 | 17 | VERTEX_MAIN_SUPPORT 18 | 19 | gl_Position = vec4(position.xy, 1.0, 1.0); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/materials/glsl/luminance.frag: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef FRAMEBUFFER_PRECISION_HIGH 4 | 5 | uniform mediump sampler2D inputBuffer; 6 | 7 | #else 8 | 9 | uniform lowp sampler2D inputBuffer; 10 | 11 | #endif 12 | 13 | #ifdef RANGE 14 | 15 | uniform vec2 range; 16 | 17 | #elif defined(THRESHOLD) 18 | 19 | uniform float threshold; 20 | uniform float smoothing; 21 | 22 | #endif 23 | 24 | varying vec2 vUv; 25 | 26 | void main() { 27 | 28 | vec4 texel = texture2D(inputBuffer, vUv); 29 | float l = luminance(texel.rgb); 30 | 31 | #ifdef RANGE 32 | 33 | // Apply a luminance range mask. 34 | float low = step(range.x, l); 35 | float high = step(l, range.y); 36 | 37 | l *= low * high; 38 | 39 | #elif defined(THRESHOLD) 40 | 41 | l = smoothstep(threshold, threshold + smoothing, l) * l; 42 | 43 | #endif 44 | 45 | #ifdef COLOR 46 | 47 | gl_FragColor = vec4(texel.rgb * clamp(l, 0.0, 1.0), l); 48 | 49 | #else 50 | 51 | gl_FragColor = vec4(l); 52 | 53 | #endif 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/materials/glsl/outline.frag: -------------------------------------------------------------------------------- 1 | uniform lowp sampler2D inputBuffer; 2 | 3 | varying vec2 vUv0; 4 | varying vec2 vUv1; 5 | varying vec2 vUv2; 6 | varying vec2 vUv3; 7 | 8 | void main() { 9 | 10 | vec2 c0 = texture2D(inputBuffer, vUv0).rg; 11 | vec2 c1 = texture2D(inputBuffer, vUv1).rg; 12 | vec2 c2 = texture2D(inputBuffer, vUv2).rg; 13 | vec2 c3 = texture2D(inputBuffer, vUv3).rg; 14 | 15 | float d0 = (c0.x - c1.x) * 0.5; 16 | float d1 = (c2.x - c3.x) * 0.5; 17 | float d = length(vec2(d0, d1)); 18 | 19 | float a0 = min(c0.y, c1.y); 20 | float a1 = min(c2.y, c3.y); 21 | float visibilityFactor = min(a0, a1); 22 | 23 | gl_FragColor.rg = (1.0 - visibilityFactor > 0.001) ? vec2(d, 0.0) : vec2(0.0, d); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/materials/glsl/outline.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 texelSize; 2 | 3 | varying vec2 vUv0; 4 | varying vec2 vUv1; 5 | varying vec2 vUv2; 6 | varying vec2 vUv3; 7 | 8 | void main() { 9 | 10 | vec2 uv = position.xy * 0.5 + 0.5; 11 | 12 | vUv0 = vec2(uv.x + texelSize.x, uv.y); 13 | vUv1 = vec2(uv.x - texelSize.x, uv.y); 14 | vUv2 = vec2(uv.x, uv.y + texelSize.y); 15 | vUv3 = vec2(uv.x, uv.y - texelSize.y); 16 | 17 | gl_Position = vec4(position.xy, 1.0, 1.0); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/materials/glsl/smaa-weights.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 texelSize; 2 | uniform vec2 resolution; 3 | 4 | varying vec2 vUv; 5 | varying vec4 vOffset[3]; 6 | varying vec2 vPixCoord; 7 | 8 | void main() { 9 | 10 | vUv = position.xy * 0.5 + 0.5; 11 | vPixCoord = vUv * resolution; 12 | 13 | // Offsets for the searches (see @PSEUDO_GATHER4). 14 | vOffset[0] = vUv.xyxy + texelSize.xyxy * vec4(-0.25, -0.125, 1.25, -0.125); 15 | vOffset[1] = vUv.xyxy + texelSize.xyxy * vec4(-0.125, -0.25, -0.125, 1.25); 16 | 17 | // This indicates the ends of the loops. 18 | vOffset[2] = vec4(vOffset[0].xz, vOffset[1].yw) + 19 | vec4(-2.0, 2.0, -2.0, 2.0) * texelSize.xxyy * MAX_SEARCH_STEPS_FLOAT; 20 | 21 | gl_Position = vec4(position.xy, 1.0, 1.0); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/materials/glsl/ssao.vert: -------------------------------------------------------------------------------- 1 | uniform vec2 noiseScale; 2 | 3 | varying vec2 vUv; 4 | varying vec2 vUv2; 5 | 6 | void main() { 7 | 8 | vUv = position.xy * 0.5 + 0.5; 9 | vUv2 = vUv * noiseScale; 10 | 11 | gl_Position = vec4(position.xy, 1.0, 1.0); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/textures/index.js: -------------------------------------------------------------------------------- 1 | export * from "./lut/index.js"; 2 | export * from "./smaa/index.js"; 3 | 4 | export * from "./ASCIITexture.js"; 5 | export * from "./NoiseTexture.js"; 6 | export * from "./RawImageData.js"; 7 | -------------------------------------------------------------------------------- /src/textures/lut/index.js: -------------------------------------------------------------------------------- 1 | export * from "./LookupTexture.js"; 2 | export * from "./TetrahedralUpscaler.js"; 3 | 4 | /** @deprecated Renamed to LookupTexture. */ 5 | export { LookupTexture as LookupTexture3D } from "./LookupTexture.js"; 6 | -------------------------------------------------------------------------------- /src/textures/lut/worker.js: -------------------------------------------------------------------------------- 1 | import { LUTOperation } from "../../enums/LUTOperation.js"; 2 | import { TetrahedralUpscaler } from "./TetrahedralUpscaler.js"; 3 | 4 | /** 5 | * Performs long-running LUT transformations. 6 | * 7 | * @private 8 | * @param {Event} event - A message event. 9 | */ 10 | 11 | self.addEventListener("message", (event) => { 12 | 13 | const request = event.data; 14 | let data = request.data; 15 | 16 | switch(request.operation) { 17 | 18 | case LUTOperation.SCALE_UP: 19 | data = TetrahedralUpscaler.expand(data, request.size); 20 | break; 21 | 22 | } 23 | 24 | postMessage(data, [data.buffer]); 25 | close(); 26 | 27 | }); 28 | -------------------------------------------------------------------------------- /src/textures/smaa/area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/src/textures/smaa/area.png -------------------------------------------------------------------------------- /src/textures/smaa/index.js: -------------------------------------------------------------------------------- 1 | export * from "./SMAAAreaImageData.js"; 2 | export * from "./SMAAImageGenerator.js"; 3 | export * from "./SMAASearchImageData.js"; 4 | -------------------------------------------------------------------------------- /src/textures/smaa/search.cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/src/textures/smaa/search.cropped.png -------------------------------------------------------------------------------- /src/textures/smaa/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmndrs/postprocessing/0ae2177da589625a26c0aafa134fbf3f95a5cd20/src/textures/smaa/search.png -------------------------------------------------------------------------------- /src/textures/smaa/searchImageDataURL.js: -------------------------------------------------------------------------------- 1 | // Generated with SMAASearchImageData.generate().toCanvas().toDataURL(), cropped, high dynamic range. 2 | /* eslint-disable @stylistic/max-len */ 3 | export default "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAAeElEQVRYR+2XSwqAMAxEJ168ePEqwRSKhIIiuHjJqiU0gWE+1CQdApcVAMUAuARaMGCX1MIL/Ow13++9lW2s3mW9MWvsnWc/2fvGygwPAN4E8QzAA4CXAB6AHjG4JTHYI1ey3pcx6FHnEfhLDOIBKAmUBK6/ANUDTlROXAHd9EC1AAAAAElFTkSuQmCC"; 4 | -------------------------------------------------------------------------------- /src/textures/smaa/worker.js: -------------------------------------------------------------------------------- 1 | import { SMAAAreaImageData } from "./SMAAAreaImageData.js"; 2 | import { SMAASearchImageData } from "./SMAASearchImageData.js"; 3 | 4 | /** 5 | * Generates the SMAA area and search lookup tables. 6 | * 7 | * @private 8 | * @param {Event} event - A message event. 9 | */ 10 | 11 | self.addEventListener("message", (event) => { 12 | 13 | const areaImageData = SMAAAreaImageData.generate(); 14 | const searchImageData = SMAASearchImageData.generate(); 15 | 16 | postMessage({ areaImageData, searchImageData }, [ 17 | areaImageData.data.buffer, 18 | searchImageData.data.buffer 19 | ]); 20 | 21 | close(); 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /src/utils/IdManager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An ID manager. 3 | */ 4 | 5 | export class IdManager { 6 | 7 | /** 8 | * Constructs a new ID manager. 9 | * 10 | * @param initialId - The first ID. 11 | */ 12 | 13 | constructor(initialId = 0) { 14 | 15 | /** 16 | * The next ID. 17 | */ 18 | 19 | this.nextId = initialId; 20 | 21 | } 22 | 23 | /** 24 | * Returns the next unique ID. 25 | * 26 | * @return The ID. 27 | */ 28 | 29 | getNextId() { 30 | 31 | return this.nextId++; 32 | 33 | } 34 | 35 | /** 36 | * Resets the ID counter. 37 | * 38 | * @param initialId - The first ID. 39 | * @return This manager. 40 | */ 41 | 42 | reset(initialId = 0) { 43 | 44 | this.nextId = initialId; 45 | return this; 46 | 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/utils/index.js: -------------------------------------------------------------------------------- 1 | export * from "./orthographicDepthToViewZ.js"; 2 | export * from "./viewZToOrthographicDepth.js"; 3 | 4 | export * from "./IdManager.js"; 5 | -------------------------------------------------------------------------------- /src/utils/orthographicDepthToViewZ.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts orthographic depth to view Z. 3 | * 4 | * @see https://github.com/mrdoob/three.js/blob/0de4e75ee65c3238957318b88ef91b6597e23c1e/src/renderers/shaders/ShaderChunk/packing.glsl.js#L42 5 | * @param {Number} depth - The linear clip Z. 6 | * @param {Number} near - The camera near plane. 7 | * @param {Number} far - The camera far plane. 8 | * @return {Number} The view Z. 9 | * @ignore 10 | */ 11 | 12 | export function orthographicDepthToViewZ(depth, near, far) { 13 | 14 | return depth * (near - far) - near; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/utils/viewZToOrthographicDepth.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts view Z to orthographic depth. 3 | * 4 | * @see https://github.com/mrdoob/three.js/blob/0de4e75ee65c3238957318b88ef91b6597e23c1e/src/renderers/shaders/ShaderChunk/packing.glsl.js#L39 5 | * @param {Number} viewZ - The view Z. Expected to be negative. 6 | * @param {Number} near - The camera near plane. 7 | * @param {Number} far - The camera far plane. 8 | * @return {Number} The depth. 9 | * @ignore 10 | */ 11 | 12 | export function viewZToOrthographicDepth(viewZ, near, far) { 13 | 14 | return Math.min(Math.max((viewZ + near) / (near - far), 0.0), 1.0); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test/core/EffectComposer.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { EffectComposer } from "postprocessing"; 3 | 4 | test("can be instantiated and disposed", t => { 5 | 6 | const object = new EffectComposer(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/core/GaussKernel.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { GaussKernel } from "postprocessing"; 3 | 4 | test("can be instantiated", t => { 5 | 6 | t.truthy(new GaussKernel(3)); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/core/OverrideMaterialManager.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { OverrideMaterialManager } from "postprocessing"; 3 | 4 | test("can be instantiated and disposed", t => { 5 | 6 | const object = new OverrideMaterialManager(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | 13 | test("has a workaround that can be enabled and disabled", t => { 14 | 15 | OverrideMaterialManager.workaroundEnabled = true; 16 | t.is(OverrideMaterialManager.workaroundEnabled, true); 17 | 18 | OverrideMaterialManager.workaroundEnabled = false; 19 | t.is(OverrideMaterialManager.workaroundEnabled, false); 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /test/core/Selection.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { Selection } from "postprocessing"; 3 | 4 | test("can be instantiated", t => { 5 | 6 | t.truthy(new Selection()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/core/Timer.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { Timer } from "postprocessing"; 3 | 4 | test("can be instantiated", t => { 5 | 6 | t.truthy(new Timer()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/effects/ASCIIEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ASCIIEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ASCIIEffect({ asciiTexture: null }); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/BloomEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { BloomEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new BloomEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/BokehEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { BokehEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new BokehEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/BrightnessContrastEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { BrightnessContrastEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new BrightnessContrastEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/ChromaticAberrationEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ChromaticAberrationEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ChromaticAberrationEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/ColorAverageEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ColorAverageEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ColorAverageEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/ColorDepthEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ColorDepthEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ColorDepthEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/DepthEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new DepthEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/DepthOfFieldEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthOfFieldEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new DepthOfFieldEffect(null); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/DotScreenEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DotScreenEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new DotScreenEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/Effect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { Effect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new Effect("Test", null); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/FXAAEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { FXAAEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new FXAAEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/GammaCorrectionEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { GammaCorrectionEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new GammaCorrectionEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/GlitchEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { GlitchEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new GlitchEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/GodRaysEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { Mesh } from "three"; 3 | import { GodRaysEffect } from "postprocessing"; 4 | 5 | test("can be created and destroyed", t => { 6 | 7 | const object = new GodRaysEffect(null, new Mesh()); 8 | object.dispose(); 9 | 10 | t.pass(); 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /test/effects/GridEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { GridEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new GridEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/HueSaturationEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { HueSaturationEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new HueSaturationEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/LUT1DEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LUT1DEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new LUT1DEffect(null); 7 | t.is(object.name, "LUT1DEffect"); 8 | object.dispose(); 9 | 10 | t.pass(); 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /test/effects/LUT3DEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LUT3DEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new LUT3DEffect(null); 7 | t.is(object.name, "LUT3DEffect"); 8 | object.dispose(); 9 | 10 | t.pass(); 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /test/effects/LensDistortionEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LensDistortionEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new LensDistortionEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/NoiseEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { NoiseEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new NoiseEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/OutlineEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { OutlineEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new OutlineEffect(null, null); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/PixelationEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { PixelationEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new PixelationEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/RealisticBokehEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { RealisticBokehEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new RealisticBokehEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/SMAAEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { SMAAEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new SMAAEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/SSAOEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { SSAOEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new SSAOEffect(null); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/ScanlineEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ScanlineEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ScanlineEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/SelectiveBloomEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { Scene } from "three"; 3 | import { SelectiveBloomEffect } from "postprocessing"; 4 | 5 | test("can be created and destroyed", t => { 6 | 7 | const object = new SelectiveBloomEffect(new Scene(), null); 8 | object.dispose(); 9 | 10 | t.pass(); 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /test/effects/SepiaEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { SepiaEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new SepiaEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/ShockWaveEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ShockWaveEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ShockWaveEffect(null); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/TextureEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { TextureEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new TextureEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/TiltShiftEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { TiltShiftEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new TiltShiftEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/ToneMappingEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ToneMappingEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ToneMappingEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/VignetteEffect.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { VignetteEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new VignetteEffect(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/effects/blending/BlendMode.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { BlendFunction, BlendMode } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | const object = new BlendMode(BlendFunction.NORMAL); 7 | t.pass(); 8 | 9 | }); 10 | 11 | test("can return shader code", t => { 12 | 13 | const object = new BlendMode(BlendFunction.NORMAL); 14 | t.pass(); 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /test/images/RawImageData.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { RawImageData } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new RawImageData()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/images/lut/TetrahedralUpscaler.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LookupTexture3D, TetrahedralUpscaler } from "postprocessing"; 3 | 4 | test("generates accurate upscaled data", t => { 5 | 6 | const lutNeutral4 = LookupTexture3D.createNeutral(4); 7 | const expected = LookupTexture3D.createNeutral(32); 8 | const expectedData = expected.image.data; 9 | 10 | const result = TetrahedralUpscaler.expand(lutNeutral4.image.data, 32); 11 | let matches = (result.length === expectedData.length); 12 | 13 | for(let i = 0, l = result.length; i < l; ++i) { 14 | 15 | if(Math.abs(result[i] - expectedData[i]) > 1e-7) { 16 | 17 | matches = false; 18 | 19 | } 20 | 21 | } 22 | 23 | t.true(matches); 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /test/images/smaa/SMAAImageGenerator.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { SMAAImageGenerator } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new SMAAImageGenerator()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/images/textures/LookupTexture3D.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LookupTexture3D } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new LookupTexture3D()); 7 | 8 | }); 9 | 10 | test("can create neutral data", t => { 11 | 12 | const expectedData = new Float32Array([ 13 | 0, 0, 0, 1, 1, 0, 0, 1, 14 | 0, 1, 0, 1, 1, 1, 0, 1, 15 | 0, 0, 1, 1, 1, 0, 1, 1, 16 | 0, 1, 1, 1, 1, 1, 1, 1 17 | ]); 18 | 19 | const result = LookupTexture3D.createNeutral(2); 20 | t.deepEqual(result.image.data, expectedData); 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /test/images/textures/NoiseTexture.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { NoiseTexture } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new NoiseTexture(1, 1)); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/loaders/LUT3dlLoader.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LUT3dlLoader } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new LUT3dlLoader()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/loaders/LUTCubeLoader.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LUTCubeLoader } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new LUTCubeLoader()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/loaders/SMAAImageLoader.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { SMAAImageLoader } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new SMAAImageLoader()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/AdaptiveLuminanceMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { AdaptiveLuminanceMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new AdaptiveLuminanceMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/BokehMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { BokehMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new BokehMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/BoxBlurMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { BoxBlurMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new BoxBlurMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/CircleOfConfusionMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { CircleOfConfusionMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new CircleOfConfusionMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/CopyMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { CopyMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new CopyMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/DepthComparisonMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthComparisonMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new DepthComparisonMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/DepthCopyMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthCopyMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new DepthCopyMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/DepthDownsamplingMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthDownsamplingMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new DepthDownsamplingMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/DepthMaskMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthMaskMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new DepthMaskMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/DownsamplingMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DownsamplingMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new DownsamplingMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/EdgeDetectionMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { EdgeDetectionMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new EdgeDetectionMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/EffectMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { EffectMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new EffectMaterial(new Map(), null, null)); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/GaussianBlurMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { GaussianBlurMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new GaussianBlurMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/GodRaysMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { GodRaysMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new GodRaysMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/KawaseBlurMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { KawaseBlurMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new KawaseBlurMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/LuminanceMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LuminanceMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new LuminanceMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/MaskMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { MaskMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new MaskMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/OutlineMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { OutlineMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new OutlineMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/SMAAWeightsMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { SMAAWeightsMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new SMAAWeightsMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/SSAOMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { SSAOMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new SSAOMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/TiltShiftBlurMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { TiltShiftBlurMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new TiltShiftBlurMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/materials/UpsamplingMaterial.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { UpsamplingMaterial } from "postprocessing"; 3 | 4 | test("can be created", t => { 5 | 6 | t.truthy(new UpsamplingMaterial()); 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /test/passes/AdaptiveLuminancePass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { AdaptiveLuminancePass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new AdaptiveLuminancePass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/BoxBlurPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { BoxBlurPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new BoxBlurPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/ClearMaskPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ClearMaskPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ClearMaskPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/ClearPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ClearPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ClearPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/CopyPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { CopyPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new CopyPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/DepthCopyPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthCopyPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new DepthCopyPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/DepthDownsamplingPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthDownsamplingPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new DepthDownsamplingPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/DepthPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new DepthPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/DepthPickingPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { DepthPickingPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new DepthPickingPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/EffectPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { EffectPass, TextureEffect } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new EffectPass(null); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | 13 | test("can create a compound shader material", t => { 14 | 15 | t.truthy(new EffectPass(null, new TextureEffect())); 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /test/passes/GaussianBlurPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { GaussianBlurPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new GaussianBlurPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/KawaseBlurPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { KawaseBlurPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new KawaseBlurPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/LambdaPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LambdaPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new LambdaPass(null); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/LuminancePass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { LuminancePass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new LuminancePass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/MaskPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { MaskPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new MaskPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/MipmapBlurPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { MipmapBlurPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new MipmapBlurPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/NormalPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { NormalPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new NormalPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/Pass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { Pass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new Pass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/RenderPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { RenderPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new RenderPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/ShaderPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { ShaderPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new ShaderPass(null); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /test/passes/TiltShiftBlurPass.js: -------------------------------------------------------------------------------- 1 | import test from "ava"; 2 | import { TiltShiftBlurPass } from "postprocessing"; 3 | 4 | test("can be created and destroyed", t => { 5 | 6 | const object = new TiltShiftBlurPass(); 7 | object.dispose(); 8 | 9 | t.pass(); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "./src", 4 | "./demo/src", 5 | "./manual/js", 6 | "./types" 7 | ], 8 | "compilerOptions": { 9 | "baseUrl": ".", 10 | "outDir": "./build", 11 | "moduleResolution": "bundler", 12 | "module": "ES2022", 13 | "target": "ES2022", 14 | "strict": true, 15 | "allowJs": true, 16 | "sourceMap": false, 17 | "skipLibCheck": true, 18 | "importHelpers": true, 19 | "resolveJsonModule": true, 20 | "noImplicitOverride": true, 21 | "allowSyntheticDefaultImports": true, 22 | "paths": { 23 | "postprocessing": ["./src/index.js"], 24 | "temp": ["./temp"] 25 | } 26 | } 27 | } 28 | --------------------------------------------------------------------------------
{{ i18n "epilepsyWarning" . }}