![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ImportanceSamplingLibrary.h>
Public Member Functions | |
| FImportanceTexture () | |
| FImportanceTexture (UTexture2D *SourceTexture, TEnumAsByte< EImportanceWeight::Type > WeightingFunc) | |
| FImportanceTexture (const FImportanceTexture &Other) | |
| FImportanceTexture (FImportanceTexture &&Other) | |
| FImportanceTexture & | operator= (const FImportanceTexture &Other) |
| FImportanceTexture & | operator= (FImportanceTexture &&Other) |
| void | Initialize (UTexture2D *SourceTexture, TEnumAsByte< EImportanceWeight::Type > WeightingFunc) |
| void | ImportanceSample (const FVector2D &Rand, int Samples, float Intensity, FVector2D &SamplePosition, FLinearColor &SampleColor, float &SampleIntensity, float &SampleSize) const |
| FLinearColor | GetColorBilinear (FVector2D Position, int32 Mip) const |
| FLinearColor | GetColorTrilinear (FVector2D Position, float Mip) const |
| float | ImportanceWeight (FColor Texel, TEnumAsByte< EImportanceWeight::Type > WeightingFunc) const |
Public Attributes | |
| FIntPoint | Size |
| int | NumMips |
| TArray< float > | MarginalCDF |
| TArray< float > | ConditionalCDF |
| TArray< FColor > | TextureData_DEPRECATED |
| TArray< FLinearColor > | LinearTextureData |
| TWeakObjectPtr< UTexture2D > | Texture |
| TEnumAsByte< EImportanceWeight::Type > | Weighting |
Texture processed for importance sampling Holds marginal PDF of the rows, as well as the PDF of each row
| PRAGMA_DISABLE_DEPRECATION_WARNINGS FImportanceTexture::FImportanceTexture | ( | ) |
| FImportanceTexture::FImportanceTexture | ( | UTexture2D * | SourceTexture, |
| TEnumAsByte< EImportanceWeight::Type > | WeightingFunc | ||
| ) |
|
default |
|
default |
| FLinearColor FImportanceTexture::GetColorBilinear | ( | FVector2D | Position, |
| int32 | Mip | ||
| ) | const |
| PRAGMA_ENABLE_DEPRECATION_WARNINGS FLinearColor FImportanceTexture::GetColorTrilinear | ( | FVector2D | Position, |
| float | Mip | ||
| ) | const |
| void FImportanceTexture::ImportanceSample | ( | const FVector2D & | Rand, |
| int | Samples, | ||
| float | Intensity, | ||
| FVector2D & | SamplePosition, | ||
| FLinearColor & | SampleColor, | ||
| float & | SampleIntensity, | ||
| float & | SampleSize | ||
| ) | const |
Distribute sample points proportional to Texture2D luminance.
| Rand | - Random 2D point with components evenly distributed between 0 and 1 |
| Samples | - Total number of samples that will be used |
| Intensity | - Overall target intensity scale @outparam SamplePosition - Importance sampled 2D output texture coordinate (0-1) @outparam SampleColor - Representative color near Position from MIP level for SampleSize @outparam SampleIntensity - Intensity of individual point @outparam SampleSize - Local density of points near Position (scaled for 1x1 texture space) |
| float FImportanceTexture::ImportanceWeight | ( | FColor | Texel, |
| TEnumAsByte< EImportanceWeight::Type > | WeightingFunc | ||
| ) | const |
| void FImportanceTexture::Initialize | ( | UTexture2D * | SourceTexture, |
| TEnumAsByte< EImportanceWeight::Type > | WeightingFunc | ||
| ) |
|
default |
|
default |
| TArray<FLinearColor> FImportanceTexture::LinearTextureData |
| int FImportanceTexture::NumMips |
| FIntPoint FImportanceTexture::Size |
| TWeakObjectPtr<UTexture2D> FImportanceTexture::Texture |
| TEnumAsByte<EImportanceWeight::Type> FImportanceTexture::Weighting |