utk-render
Version:
FiveM Realtime GameView for HTML
34 lines (18 loc) • 597 B
JavaScript
export default /* glsl */`
normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; // overrides both flatShading and attribute normals
normal = - normal;
normal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );
normal = normalize( normalMatrix * normal );
normal = perturbNormal2Arb( -vViewPosition, normal );
normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );
`;