import { float, int, ivec2, sampler2D, samplerCube, vec2, vec3, vec4 } from "./ShaderTypes"; /** * samples a normal map and remaps values from 0 -> 1 to -1 -> 1 * @param normalMap the normal map to be sampled * @param uv the coordinates used to sample the normal map * @returns rgb color values from normal map */ export declare const sampleNormalMap: (normalMap: sampler2D, uv: vec2) => vec3 | string; /** * Gets an index for the current texel on an fbo texture * @param fboTex the fbo texture * @param texCoord the texel coordinates - usually ivec2(gl_FragCoord.xy) * @returns the index of the current texel */ export declare const getFboIndex: (fboTex: sampler2D, texCoord: ivec2) => int | string; /** * samples environment map reflections in world space * @param envMap the environment map cube texture * @param eyeVec the vector from the fragment pos towards the camera * @param normal the surface normal * @returns a vec3 with colors of the reflected cube map */ export declare const reflectEnvMap: (envMap: samplerCube, eyeVec: vec3, normal: vec3) => vec3 | string; /** * samples refracted environment map * @param envMap the environment map cube texture * @param viewVec the vector from the camera towards the fragment * @param normal the surface normal * @param refractionIndex the index of refraction (1.33 for water, higher for denser materials) * @returns the refracted env map texture */ export declare const refractEnvMap: (envMap?: samplerCube, viewVec?: vec3, normal?: vec3, refractionIndex?: float) => vec3 | string; /** * samples refracted texture * @param envMap the environment map cube texture * @param screenUv the screen space UV coords * @param viewVec the vector from the camera towards the fragment * @param normal the surface normal * @param refractionIndex the index of refraction (1.33 for water, higher for denser materials) * @returns the refracted texture */ export declare const refractTexture: (envMap?: samplerCube, screenUv?: vec2, viewVec?: vec3, normal?: vec3, refractionIndex?: float) => vec3 | string; /** * offsets UVs in the -z direction in tangent space to create a parallax effect * @param uv regular tangent space uv coordinates * @param tangentSpaceViewDir the view direction in tangent space * @param offsetScale how far the new UV will be offset * @returns new UV values with z offset */ export declare const parallaxOffsetUV: (uv: vec2, tangentSpaceViewDir: vec3, offsetScale: float) => vec2 | string; /** * Use a lookup table texture to easily adjust color values. Ensure the LUT texture * has min and mag filters set to THREE.LinearFilter for best results * @param originalColor the input color value * @param lutTexture the look up table texture * @returns recolored values based on the provided lookup table */ export declare const lookupTable: (originalColor: vec4, lutTexture: sampler2D) => vec4 | any; export declare const blur5: (image?: sampler2D, uv?: vec2, resolution?: vec2, direction?: vec2) => vec4 | any; export declare const blur9: (image?: sampler2D, uv?: vec2, resolution?: vec2, direction?: vec2) => vec4 | any; export declare const blur13: (image?: sampler2D, uv?: vec2, resolution?: vec2, direction?: vec2) => vec4 | any; export declare const uvToPolar: () => string; export declare const TextureFunctions: { sampleNormalMap: (normalMap: sampler2D, uv: vec2) => vec3 | string; getFboIndex: (fboTex: sampler2D, texCoord: ivec2) => int | string; reflectEnvMap: (envMap: samplerCube, eyeVec: vec3, normal: vec3) => vec3 | string; refractEnvMap: (envMap?: samplerCube, viewVec?: vec3, normal?: vec3, refractionIndex?: float) => vec3 | string; refractTexture: (envMap?: samplerCube, screenUv?: vec2, viewVec?: vec3, normal?: vec3, refractionIndex?: float) => vec3 | string; parallaxOffsetUV: (uv: vec2, tangentSpaceViewDir: vec3, offsetScale: float) => vec2 | string; lookupTable: (originalColor: vec4, lutTexture: sampler2D) => vec4 | any; blur5: (image?: sampler2D, uv?: vec2, resolution?: vec2, direction?: vec2) => vec4 | any; blur9: (image?: sampler2D, uv?: vec2, resolution?: vec2, direction?: vec2) => vec4 | any; blur13: (image?: sampler2D, uv?: vec2, resolution?: vec2, direction?: vec2) => vec4 | any; };