@pixi/3d
    Preparing search index...

    Variable mathConstantsBitConst Advanced

    mathConstantsBit: ShaderBit = ...

    Declares the constants PI and INV_PI for a bit that lists it in requires

    The lighting of Material3D and PhongMaterial requires it already, so a bit for either must not declare its own PI or INV_PI: the second declaration fails the compile.

    const ringsBit: ShaderBit = {
    name: 'rings',
    requires: [mathConstantsBit],
    gpu: { fragment: { material: 'albedo *= 0.75 + 0.25 * cos(input.vUV.x * 8.0 * PI);' } },
    gl: { fragment: { material: 'albedo *= 0.75 + 0.25 * cos(vUV.x * 8.0 * PI);' } },
    };