summit/frontend/node_modules/three-stdlib/shaders/FXAAShader.cjs.map

1 line
57 KiB
Plaintext
Raw Normal View History

2025-12-08 16:31:30 +00:00
{"version":3,"file":"FXAAShader.cjs","sources":["../../src/shaders/FXAAShader.ts"],"sourcesContent":["import { Vector2 } from 'three'\n\n/**\n * NVIDIA FXAA by Timothy Lottes\n * http://timothylottes.blogspot.com/2011/06/fxaa3-source-released.html\n * - WebGL port by @supereggbert\n * http://www.glge.org/demos/fxaa/\n */\n\nexport const FXAAShader = {\n uniforms: {\n tDiffuse: { value: null },\n resolution: { value: /* @__PURE__ */ new Vector2(1 / 1024, 1 / 512) },\n },\n\n vertexShader: /* glsl */ `\n varying vec2 vUv;\n\n void main() {\n\n \tvUv = uv;\n \tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n `,\n\n fragmentShader: /* glsl */ `\n precision highp float;\n \n uniform sampler2D tDiffuse;\n \n uniform vec2 resolution;\n \n varying vec2 vUv;\n \n // FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)\n \n //----------------------------------------------------------------------------------\n // File: es3-keplerFXAAassetsshaders/FXAA_DefaultES.frag\n // SDK Version: v3.00\n // Email: gameworks@nvidia.com\n // Site: http://developer.nvidia.com/\n //\n // Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n //\n // Redistribution and use in source and binary forms, with or without\n // modification, are permitted provided that the following conditions\n // are met:\n // * Redistributions of source code must retain the above copyright\n // notice, this list of conditions and the following disclaimer.\n // * Redistributions in binary form must reproduce the above copyright\n // notice, this list of conditions and the following disclaimer in the\n // documentation and/or other materials provided with the distribution.\n // * Neither the name of NVIDIA CORPORATION nor the names of its\n // contributors may be used to endorse or promote products derived\n // from this software without specific prior written permission.\n //\n // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AS IS AND ANY\n // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n //\n //----------------------------------------------------------------------------------\n \n #define FXAA_PC 1\n #define FXAA_GLSL_100 1\n #define FXAA_QUALITY_PRESET 12\n \n #define FXAA_GREEN_AS_LUMA 1\n \n /*--------------------------------------------------------------------------*/\n #ifndef FXAA_PC_CONSOLE\n //\n // The console algorithm for PC is included\n // for developers targeting really low spec machines.\n // Likely better to just run FXAA_PC, and use a really low preset.\n //\n #define FXAA_PC_CONSOLE 0\n #endif\n /*--------------------------------------------------------------------------*/\n #ifndef FXAA_GLSL_120\n #define FXAA_GLSL_120 0\n #endif\n /*--------------------------------------------------------------------------*/\n #ifndef FXAA_GLSL_130\n #define FXAA_GLSL_130 0\n #endif\n /*--------------------------------------------------------------------------*/\n #ifndef FXAA_HLSL_3\n #define FXAA_HLSL_3 0\n #endif\n /*--------------------------------------------------------------------------*/\n #ifndef FX