rhodonite
    Preparing search index...

    Class Bloom

    Index

    Constructors

    Methods

    • Creates a complete bloom effect expression with all required render passes.

      The bloom effect consists of three main stages:

      1. Detect high luminance areas in the input texture
      2. Apply multiple levels of Gaussian blur to create a glow effect
      3. Synthesize the original texture with the blurred high luminance areas

      Parameters

      • params: {
            parameters: {
                gaussianBlurLevelHighLuminance?: number;
                gaussianKernelSize?: number;
                gaussianVariance?: number;
                luminanceCriterion?: number;
                synthesizeCoefficient?: [number, number, number, number, number, number];
            };
            textureToBloom: AbstractTexture;
        }

        Configuration object for the bloom effect

        • parameters: {
              gaussianBlurLevelHighLuminance?: number;
              gaussianKernelSize?: number;
              gaussianVariance?: number;
              luminanceCriterion?: number;
              synthesizeCoefficient?: [number, number, number, number, number, number];
          }

          Bloom effect parameters

          • OptionalgaussianBlurLevelHighLuminance?: number

            Number of blur levels to apply (default: 4)

          • OptionalgaussianKernelSize?: number

            Size of the Gaussian blur kernel (default: 10)

          • OptionalgaussianVariance?: number

            Variance of the Gaussian distribution (default: 10)

          • OptionalluminanceCriterion?: number

            Threshold for detecting high luminance areas (default: 1.0)

          • OptionalsynthesizeCoefficient?: [number, number, number, number, number, number]

            Blend coefficients for combining blur levels (default: computed array)

        • textureToBloom: AbstractTexture

          The source texture to apply bloom effect to

      Returns { bloomedRenderTarget: RenderTargetTexture; bloomExpression: Expression }

      Object containing the bloom expression and the final render target texture

    • Destroys all 3D API resources used by this Bloom instance.

      This method cleans up all cached framebuffers and their associated GPU resources. It should be called when the Bloom instance is no longer needed to prevent memory leaks and properly release graphics resources.

      Returns void