@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
2 lines (1 loc) • 356 B
JavaScript
export default "\nvec3 clothSolverPosition(sampler2D tPosition0, sampler2D tPosition1, vec2 clothSolverUv) {\n return ( texture2D( tPosition0, clothSolverUv ).xyz + texture2D( tPosition1, clothSolverUv ).xyz ) / 1024.0;\n}\nvec3 clothSolverNormal(sampler2D tNormal, vec2 clothSolverUv) {\n return normalize( texture2D( tNormal, clothSolverUv ).xyz );\n}";