BadTV Effect for Three.js

Related tags

Effect bad-tv-shader
Overview

Bad TV Shader for Three.js

Simulates a bad TV via horizontal distortion and vertical roll.

Screenshot

screenshot.jpg

Demo

View Demo

Uniforms

  • time steadily increasing float passed in
  • distortion amount of thick distortion
  • distortion2 amount of fine grain distortion
  • speed distortion vertical travel speed
  • rollSpeed vertical roll speed

Usage

composer = new THREE.EffectComposer( renderer);
renderPass = new THREE.RenderPass( scene, camera );
badTVPass = new THREE.ShaderPass( THREE.BadTVShader );
composer.addPass( renderPass );
composer.addPass( badTVPass );
badTVPass.renderToScreen = true;

View demo for full usage details.

Credits

Uses Ashima WebGL Noise, three.js

License

MIT © Felix Turner

You might also like...

Warp drive is a lightweight jQuery plugin that helps you create a cool, interactive, configurable, HTML5 canvas based warp drive/starfield effect.

Warp drive is a lightweight jQuery plugin that helps you create a cool, interactive, configurable, HTML5 canvas based warp drive/starfield effect.

Warp drive jQuery plugin (jquery-warpdrive-plugin) Preview Description Warp drive is a lightweight jQuery plugin that helps you create a cool, interac

Nov 15, 2022

A mouse particle effect react component

A mouse particle effect react component

react-mouse-particles A mouse particle effect react component A very fun react library that can be used to create mouse particle effects, which are as

Dec 17, 2022

Demos for the tutorial on how to achieve an interactive mouseover/hover effect

Demos for the tutorial on how to achieve an interactive mouseover/hover effect

Interactive Hover Effects with Three.js A simple tutorial on how to achieve an interactive mouseover/hover effect on images in some easy steps. Articl

Dec 27, 2022

:tada: Add a cute click effect to your mouse in your vuepress!

vuepress-plugin-cursor-effects 🎉 Add a cute click effect to your mouse in your vuepress! Document: moefy-vuepress LiveDemo: notev Install yarn add vu

Sep 25, 2022

magneticHover lets you trigger hover effect on the element when the cursor is near it, but not over it yet

magneticHover lets you trigger hover effect on the element when the cursor is near it, but not over it yet

magneticHover magneticHover lets you trigger hover effect on the element when the cursor is near it, but not over it yet. Examples https://codesandbox

Nov 30, 2022

👓 Parallax tilt hover effect for React JS - tilt.js

👓   Parallax tilt hover effect for React JS - tilt.js

React.js - Tilt.js React version of tilt.js Demo https://vx-demo.now.sh/gallery Install yarn: yarn add react-tilt npm: npm install --save react-tilt U

Dec 23, 2022

Simple jQuery plugin for 3d Hover effect

jQuery Hover3d jQuery Hover3d is a simple hover script for creating 3d hover effect. It was my experiment on exploring CSS3 3d transform back in 2015

Jan 4, 2023

Pure CSS Image Hover Effect Library

imagehover.css A Scaleable & Light Image Hover CSS Library Imagehover.css is a lovingly crafted CSS library allowing you to easily implement scaleable

Dec 21, 2022

Javascript library enabling magnifying glass effect on an images

Magnifier.js Javascript library enabling magnifying glass effect on an images. Demo and documentation Features: Zoom in / out functionality using mous

Dec 18, 2022
Comments
  • GPU Image

    GPU Image

    Hi (noob question alert), Im a complete newbie when in comes to glsl etc. Im using your project as guide for implementing my simple projects. I'm trying to implement these https://github.com/KimDaeWook/GPUImage-Instagram using effect-composer. To no avail. I can't make it to work. I tried doing something like this

    const vertexShader = [
    	"varying vec2 textureCoordinate;",
    	"void main() {",
    	"textureCoordinate = uv;",
    	"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
    	"}"
    ].join("\n");
    
    const fragmentShader = [
    	"precision lowp float;",
    	"varying highp vec2 textureCoordinate;",
    	"uniform sampler2D inputImageTexture;",
    	"uniform sampler2D inputImageTexture2;",
    	"uniform sampler2D inputImageTexture3;",
    	"uniform sampler2D inputImageTexture4;",
    	"void main()",
    	"{",
    	"vec4 texel = texture2D(inputImageTexture, textureCoordinate);",
    	"vec3 bbTexel = texture2D(inputImageTexture2, textureCoordinate).rgb;",
    	"texel.r = texture2D(inputImageTexture3, vec2(bbTexel.r, texel.r)).r;",
    	"texel.g = texture2D(inputImageTexture3, vec2(bbTexel.g, texel.g)).g;",
    	"texel.b = texture2D(inputImageTexture3, vec2(bbTexel.b, texel.b)).b;",
    	"vec4 mapped;",
    	"mapped.r = texture2D(inputImageTexture4, vec2(texel.r, .16666)).r;",
    	"mapped.g = texture2D(inputImageTexture4, vec2(texel.g, .5)).g;",
    	"mapped.b = texture2D(inputImageTexture4, vec2(texel.b, .83333)).b;",
    	"mapped.a = 1.0;",
    	"gl_FragColor = mapped;",
    	"}"
    ].join("\n");
    
    
    THREE.IFHudsonFilter = {
    	uniforms: {
    		inputImageTexture: { type: "t", value: null},
    		inputImageTexture2: { type: "t", value: null},
    		inputImageTexture3: { type: "t", value: null},
    		inputImageTexture4: { type: "t", value: null},
    	},
    
    	vertexShader,
    	fragmentShader
    };
    
    
    var IFHudsonFilterPass = new THREE.ShaderPass(THREE.IFHudsonFilter);
    
        IFHudsonFilterPass.uniforms[ 'inputImageTexture' ].value = videoTexture;
        IFHudsonFilterPass.uniforms[ 'inputImageTexture2' ].value = new THREE.TextureLoader( "http://localhost:3000/lib/shaders/japanese/hudsonBackground.png");
        IFHudsonFilterPass.uniforms[ 'inputImageTexture3' ].value = new THREE.TextureLoader( "http://localhost:3000/lib/shaders/japanese/overlayMap.png");
        IFHudsonFilterPass.uniforms[ 'inputImageTexture4' ].value = new THREE.TextureLoader( "http://localhost:3000/lib/shaders/japanese/hudsonMap.png");
    
    composer.addPass(IFHudsonFilterPass);
    IFHudsonFilterPass.renderToScreen = true;
    

    can you help me? even if just guide or what to do? I dont know where to proceed.

    opened by kevcal69 0
  • Create npm package

    Create npm package

    Creates an npm packages for this shader so that it can be consumed more easily. I've tried to preserve the existing functionality by using the global THREE if it is available and only exporting anything if modules or exports are defined.

    Thanks for the great shader. I'm having lots of fun using it in some VR/AR experiments

    opened by mattbierner 0
Owner
Felix Turner
humanoid.
Felix Turner
A subtle tilt effect for images. The idea is to move and rotate semi-transparent copies with the same background image in order to create a subtle motion or depth effect.

Image Tilt Effect A subtle tilt effect for images. The idea is to move and rotate semi-transparent copies with the same background image in order to c

Codrops 571 Nov 21, 2022
Liquideffect - Javascript Library for creating liquid effect on image and RGB effect on mouse direction.

LiquidEffect Javascript Library for creating liquid effect on image and RGB effect on mouse direction. Demo https://liquideffect.netlify.app/ Dependen

Rohail 8 May 6, 2022
CSS 3D renderer for Three.js.

CSS3D.js by Steven Wittens CSS 3D renderer for Three.js Note: this library is mostly obsolete now that Three.js has its own CSS 3D renderer which is i

null 365 Aug 27, 2022
Add a water ripple effect to your background using WebGL.

jQuery Ripples Plugin By the powers of WebGL, add a layer of water to your HTML elements which will ripple by cursor interaction! Important: this plug

Pim Schreurs 976 Dec 30, 2022
A decorative website background effect where SVG shapes morph and transform on scroll.

Morphing Background Shapes A decorative website background effect where SVG shapes morph and transform on scroll. Article on Codrops Demo This demo is

Codrops 351 Dec 26, 2022
Background image segment effect as seen on [Filippo Bello's Portfolio](http://www.filippobello.com/portfolio).

Segment Effect Background image segment effect as seen on Filippo Bello's Portfolio. Article on Codrops Demo License Integrate or build upon it for fr

Codrops 526 Nov 29, 2022
Switch the background-image with using effect.

jQuery.BgSwitcher Switch the background image with using effect. Demo http://rewish.github.io/jquery-bgswitcher/ Usage <div class="box"> <p>Lorem ip

rewish 195 Dec 30, 2022
Recreation of the background scale hover effect seen on the DDD Hotel website using CSS clip paths.

Background Scale Hover Effect Recreation of the background scale hover effect seen on the DDD Hotel menu using CSS clip paths. Article on Codrops Demo

Codrops 98 Dec 6, 2022
A motion hover effect for a background grid of images.

Image Grid Motion Effect A motion hover effect for a background grid of images. Article on Codrops Demo Installation Install dependencies: npm install

Codrops 118 Dec 31, 2022
fixed-background-effect

Fixed Background Effect A simple template that takes advantage of the background-attachment CSS property to create a fixed background effect. Article

CodyHouse 50 Oct 28, 2022