UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

3 lines (2 loc) 616 B
declare const _default: "\n// Writes particle state to the state texture. The fragment output type (vec4 / uvec4) is set via\n// fragmentOutputTypes to match the texture format; when not float-renderable the floats are\n// reinterpreted to their uint bit patterns (RGBA32U), which is lossless.\nvoid writeOutput() {\n vec4 row = gl_FragCoord.y < 1.0 ?\n vec4(outPos, (outAngle + 1000.0) * visMode) :\n vec4(outVel, outLife);\n\n #ifdef CAPS_TEXTURE_FLOAT_RENDERABLE\n gl_FragColor = row;\n #else\n gl_FragColor = floatBitsToUint(row);\n #endif\n}\n"; export default _default;