fresnel

@three-blocks/coreWebGPUWebGL
fresnel(power : Node<float>, falloff : Node<float>) : Node<float>

Fresnel effect TSL function. Computes a view-dependent falloff based on the angle between surface normal and view direction.

Parameters
poweroptionalNode<float>
Exponent controlling the falloff curve
Default is 2.2.
falloffoptionalNode<float>
Smoothstep range for the effect
Default is 1.5.
Returns
Node<float> — Fresnel factor [0..1]
Example
import * as THREE from 'three/webgpu';
import { float, color } from 'three/tsl';
import { fresnel } from '@three-blocks/core';

const material = new THREE.MeshStandardNodeMaterial({color: 0x111111});

const rim = fresnel(float(3.5), float(0.9));
const rimCol = color('#F5B700');
material.emissiveNode = rimCol.mul(rim);