UNPKG

@three.ez/instanced-mesh

Version:

Enhanced InstancedMesh with frustum culling, fast raycasting (using BVH), sorting, visibility management and more.

3 lines 710 B
declare const _default: "\n#ifdef USE_INSTANCING_INDIRECT\n attribute uint instanceIndex;\n uniform highp sampler2D matricesTexture; \n\n mat4 getInstancedMatrix() {\n int size = textureSize( matricesTexture, 0 ).x;\n int j = int( instanceIndex ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( matricesTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( matricesTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( matricesTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( matricesTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n#endif\n"; export default _default; //# sourceMappingURL=instanced_pars_vertex.glsl.d.ts.map