{"version":3,"file":"TechnicolorShader.cjs","sources":["../../src/shaders/TechnicolorShader.ts"],"sourcesContent":["/**\n * Technicolor Shader\n * Simulates the look of the two-strip technicolor process popular in early 20th century films.\n * More historical info here: http://www.widescreenmuseum.com/oldcolor/technicolor1.htm\n * Demo here: http://charliehoey.com/technicolor_shader/shader_test.html\n */\n\nexport const TechnicolorShader = {\n  uniforms: {\n    tDiffuse: { value: null },\n  },\n\n  vertexShader: [\n    'varying vec2 vUv;',\n\n    'void main() {',\n\n    '\tvUv = uv;',\n    '\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );',\n\n    '}',\n  ].join('\\n'),\n\n  fragmentShader: [\n    'uniform sampler2D tDiffuse;',\n    'varying vec2 vUv;',\n\n    'void main() {',\n\n    '\tvec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );',\n    '\tvec4 newTex = vec4(tex.r, (tex.g + tex.b) * .5, (tex.g + tex.b) * .5, 1.0);',\n\n    '\tgl_FragColor = newTex;',\n\n    '}',\n  ].join('\\n'),\n}\n"],"names":[],"mappings":";;AAOO,MAAM,oBAAoB;AAAA,EAC/B,UAAU;AAAA,IACR,UAAU,EAAE,OAAO,KAAK;AAAA,EAC1B;AAAA,EAEA,cAAc;AAAA,IACZ;AAAA,IAEA;AAAA,IAEA;AAAA,IACA;AAAA,IAEA;AAAA,EAAA,EACA,KAAK,IAAI;AAAA,EAEX,gBAAgB;AAAA,IACd;AAAA,IACA;AAAA,IAEA;AAAA,IAEA;AAAA,IACA;AAAA,IAEA;AAAA,IAEA;AAAA,EAAA,EACA,KAAK,IAAI;AACb;;"}