UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

2 lines (1 loc) 276 B
export default "// get vec2 tex coordinate from index\nvec2 getClothSolverUV( float id, vec2 textureSize ) { \n\n vec2 coords = vec2(\n floor( mod( ( id + 0.5 ), textureSize.x ) ),\n floor( ( id + 0.5 ) / textureSize.x )\n ) + 0.5;\n\n return coords / textureSize;\n\n}\n";