UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSobol Class Reference

#include <Sobol.h>

Static Public Member Functions

static CORE_API float Evaluate (int32 Index, int32 Dim, int32 Seed=0)
 
static CORE_API float Next (int32 Index, int32 Dim, float Value)
 
static CORE_API FVector2D Evaluate (int32 Index, int32 CellBits, FIntPoint Cell, FIntPoint Seed)
 
static CORE_API FVector2D Next (int32 Index, int32 CellBits, FVector2D Value)
 
static CORE_API FVector Evaluate (int32 Index, int32 CellBits, FIntVector Cell, FIntVector Seed)
 
static CORE_API FVector Next (int32 Index, int32 CellBits, FVector Value)
 
static CORE_API uint16 ComputeGPUSpatialSeed (int32 x, int32 y, int32 Index)
 

Static Public Attributes

static constexpr int32 MaxDimension = 15
 
static constexpr int32 MaxCell2DBits = 15
 
static constexpr int32 MaxCell3DBits = 10
 

Detailed Description

Support for Sobol quasi-random numbers

Member Function Documentation

◆ ComputeGPUSpatialSeed()

uint16 FSobol::ComputeGPUSpatialSeed ( int32  x,
int32  y,
int32  Index 
)
static

Return value for GSystemTextures.SobolSampling

◆ Evaluate() [1/3]

FVector2D FSobol::Evaluate ( int32  Index,
int32  CellBits,
FIntPoint  Cell,
FIntPoint  Seed 
)
static

Evaluate Sobol number from within a 2D cell at given index

Parameters
Index- The index to evaluate.
Cell- Integer cell coordinates.
CellBits- Number of bits in cell coordinates.
Seed- A 24-bit per component 2D seed for shuffling values
Returns
The 2D Sobol result in the range 0-1 given Index

◆ Evaluate() [2/3]

FVector FSobol::Evaluate ( int32  Index,
int32  CellBits,
FIntVector  Cell,
FIntVector  Seed 
)
static

Evaluate Sobol number from within a 3D cell at given index

Parameters
Index- The index to evaluate.
Cell- Integer cell coordinates.
CellBits- Number of bits in cell coordinates.
Seed- A seed for shuffling values (0-1)
Returns
The Sobol result given Index

◆ Evaluate() [3/3]

float FSobol::Evaluate ( int32  Index,
int32  Dim,
int32  Seed = 0 
)
static

Evaluate Sobol number from one of the traditional Sobol dimensions at the given index

Parameters
Index- The index to evaluate.
Dim- The Sobol dimension to use (0-15).
Seed- A 24-bit random seed when reusing the same dimension
Returns
The Sobol result at the given Index

◆ Next() [1/3]

FVector FSobol::Next ( int32  Index,
int32  CellBits,
FVector  Value 
)
static

Evaluate next Sobol number from within a 3D cell

Parameters
Index- The index for the Sobol number to generate.
CellBits- Number of bits in cell coordinates.
Value- The value for the Sobol number at Index-1.
Returns
The Sobol result at given Index

◆ Next() [2/3]

FVector2D FSobol::Next ( int32  Index,
int32  CellBits,
FVector2D  Value 
)
static

Evaluate next Sobol number from within a 2D cell

Parameters
Index- The index for the Sobol number to generate.
CellBits- Number of bits in cell coordinates.
Value- The value for the Sobol number at Index-1.
Returns
The 2D Sobol result in the range 0-1 given Index

◆ Next() [3/3]

float FSobol::Next ( int32  Index,
int32  Dim,
float  Value 
)
static

Evaluate next Sobol number from one of the traditional Sobol dimensions

Parameters
Index- The index for the Sobol number to generate.
Dim- The Sobol dimension to use (0-15)
Value- The value for the Sobol number at Index-1.
Returns
The Sobol result at the given Index

Member Data Documentation

◆ MaxCell2DBits

constexpr int32 FSobol::MaxCell2DBits = 15
inlinestaticconstexpr

◆ MaxCell3DBits

constexpr int32 FSobol::MaxCell3DBits = 10
inlinestaticconstexpr

◆ MaxDimension

constexpr int32 FSobol::MaxDimension = 15
inlinestaticconstexpr

The documentation for this class was generated from the following files: