export default /* glsl */ ` #include #include #include #include #include #include attribute vec3 offset; attribute float rotation; attribute vec3 size; void main() { vec2 alignedPosition = position.xy * size.xy; vec2 rotatedPosition; rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; #ifdef HORIZONTAL vec4 mvPosition = modelMatrix * vec4( offset, 1.0 ); mvPosition.x += rotatedPosition.x; mvPosition.z -= rotatedPosition.y; mvPosition = viewMatrix * mvPosition; #elif defined(VERTICAL) vec4 mvPosition = modelMatrix * vec4( offset, 1.0 ); mvPosition.y += rotatedPosition.y; mvPosition = viewMatrix * mvPosition; mvPosition.x += rotatedPosition.x; #else vec4 mvPosition = modelViewMatrix * vec4( offset, 1.0 ); mvPosition.xy += rotatedPosition; #endif vColor = color; gl_Position = projectionMatrix * mvPosition; #include #include #include #include } `; /* #ifndef USE_SIZEATTENUATION bool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); if ( isPerspective ) computedSize *= - mvPosition.z; #endif */