UImportanceSamplingLibrary::ImportanceSample

Distribute sample points proportional to Texture2D luminance.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/ImportanceSamplingLibrary.h

Include

#include "Kismet/ImportanceSamplingLibrary.h"

Source

/Engine/Source/Runtime/Engine/Private/Kismet/ImportanceSamplingLibrary.cpp

Syntax

static void ImportanceSample
(
    const FImportanceTexture & Texture,
    const FVector2D & Rand,
    int Samples,
    float Intensity,
    FVector2D & SamplePosition,
    FLinearColor & SampleColor,
    float & SampleIntensity,
    float & SampleSize
)

Remarks

Distribute sample points proportional to Texture2D luminance.

Parameters

Parameter

Description

Rand

Random 2D point with components evenly distributed between 0 and 1

Samples

Total number of samples that will be used

Intensity

Total intensity for light SamplePosition - Importance sampled 2D output texture coordinate (0-1) SampleColor - Representative color near Position from MIP level for SampleSize SampleIntensity - Intensity of individual points, scaled by probability and number of samples SampleSize - Local density of points near Position (scaled for 1x1 texture space)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss