Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
/
Resampling bounce

    This is the documentation for Enlighten.

    Resampling bounce

    Oct 31, 2024

    Overview

    Once the lightmap radiosity solver has run, the runtime requires that the solve output data be transformed into a format fit for feeding back into the Indirect Input Lighting stage which expects the bounce to be in the Enlighten::BounceBuffer object.

    The probe radiosity solver outputs directly to the bounce buffer, and further resampling is not required.

    Resample bounce

    Lightmap bounce resampling
    if (system->m_RadSystemCore)
    {
        // Create the parameters struct.
    	ResampleBounceParameters bounceParams;
        // Assign the pointer to the BounceBuffer we wish to update.
    	bounceParams.m_BounceBuffer		= system->m_BounceBuffer;
        // Set the pointer to the systems rad core.
    	bounceParams.m_RadSystemCore	= system->m_RadSystemCore;
        // Set the pointer to the persistent data buffer. This is used for temporal coherence optimisations when quality is set to 0.0f.
    	bounceParams.m_PersistentData	= system->m_PresistentDataBuffer;
    
        // Create the struct for the texture sampling parameters.
    	ResampleTextureParameters hqBounce;
        // Set the pointer to the beginning of the texture pixels.
    	hqBounce.m_TextureData			= system->GetOutputPointer(ENLIGHTEN_OUTPUT_IRRADIANCE);
        // Set the width of the texture in pixels.
    	hqBounce.m_TextureWidth			= system->m_RadSystemCore->m_MetaData.m_OutputWidth;
        // Set the height of the texture in pixels.
    	hqBounce.m_TextureHeight		= system->m_RadSystemCore->m_MetaData.m_OutputHeight;
        // Set the row pitch in bytes.
    	hqBounce.m_TexturePitch			= system->GetOutputPitchInBytes(ENLIGHTEN_OUTPUT_IRRADIANCE);
       // Set the byte order of the pixel format.
    	hqBounce.m_ByteOrder			= m_OutputFormatByteOrder;
    	hqBounce.m_TextureFormat		= system->m_OutputFormat;
        // Set the rescale factor for fixed point formats. This is the inverse of the maximum representable value.
    	hqBounce.m_FixedPointRescale	= IsFixedPointFormat(system->m_OutputFormat) ? m_GlobalState.m_FpFormatRescale : 1.0f;
        // Set the desired quyality of the bounce resampling. 0.0 is lowest quality (best performance). 1.0 is best quality (lowest performance).
    	hqBounce.m_Quality				= m_GlobalState.m_BounceQuality;
        // Set the parameters.
    	bounceParams.m_ResampleTextureParams	= &hqBounce;
    
        // Call the function to resample the bounce into the BounceBuffer.
    	Enlighten::ResampleBounce(bounceParams, timeUs);
    }

    2. Set Indirect input lighting parameters

    Once the BounceBuffer has been updated, it should be set as input on the IndirectInputLightingParameters struct before calling the DoIndirectInputLighting() function.

    Indirect input lighting parameters.
    Enlighten::IndirectInputLightingParameters params;
    //...
    params.m_BounceBuffer				= system->m_BounceBuffer;
    //...
    
    , multiple selections available,

    Enlighten SDK 4.03 Documentation
    Results will update as you type.
    • Welcome to Enlighten
    • How Enlighten works
    • Artist workflow
    • Install Enlighten
    • Libraries
    • Implementation guide
    • Technical reference
      • Output formats
      • Albedo handling
      • Lightmap lighting models
      • Light probe evaluation
      • Local IBL reflections
      • Light visibility data
      • Custom direct lights
      • Low level precompute API
      • Debugging the precompute
      • The low level runtime
        • Low level runtime walkthrough
          • Preparing the runtime
          • Per-frame walkthrough
            • Providing input lighting
            • Solving for irradiance
            • Solving for directional irradiance
            • Solving for probe points
            • Probe interpolation
            • Resampling bounce
          • Multiple systems at runtime
          • Low level cubemap API
        • Input lighting
        • Debug the low level runtime
      • Baked lighting
      • Performance tuning
      • Technical troubleshooting
      • Terrain LOD
      • Lightmap LOD
    • Advanced techniques
    • Tools
    • White papers
    • Release notes
    • Third-party licences
      Calendars

    You‘re viewing this with anonymous access, so some content might be blocked.
    {"serverDuration": 22, "requestCorrelationId": "5850bc7b35b84bef8d05658453d7503d"}