UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PhysicsFieldRendering.cpp File Reference

Classes

class  FPhysicsFieldRayMarchingCS
 

Functions

 IMPLEMENT_GLOBAL_SHADER (FPhysicsFieldRayMarchingCS, "/Engine/Private/PhysicsFieldVisualizer.usf", "MainCS", SF_Compute)
 
void RenderPhysicsField (FRDGBuilder &GraphBuilder, TArrayView< FViewInfo > Views, const FPhysicsFieldSceneProxy *PhysicsFieldProxy, FRDGTextureRef SceneColorTexture)
 

Variables

int32 GPhysicsFieldTargetType = EFieldPhysicsType::Field_PhysicsType_Max
 
FAutoConsoleVariableRef CVarPhysicsFieldTargetType (TEXT("r.PhysicsField.Rendering.TargetType"), GPhysicsFieldTargetType, TEXT("Physics field target to be used in the viewport show options.\n"), ECVF_RenderThreadSafe)
 
int32 GPhysicsFieldEvalType = 0
 
FAutoConsoleVariableRef CVarPhysicsFieldEvalType (TEXT("r.PhysicsField.Rendering.EvalType"), GPhysicsFieldEvalType, TEXT("Physics field boolean to check if we are evaluating exactly(0) or sampling(1) the field for visualisation.\n"), ECVF_RenderThreadSafe)
 
int32 GPhysicsFieldSystemType = 0
 
FAutoConsoleVariableRef CVarPhysicsFieldSystemType (TEXT("r.PhysicsField.Rendering.SystemType"), GPhysicsFieldSystemType, TEXT("Physics field boolean to check if we want to display the CPU(0) or GPU(1) field.\n"), ECVF_RenderThreadSafe)
 
float GPhysicsFieldTransientLifetime = 3.0f
 
FAutoConsoleVariableRef CVarPhysicsFieldTransientLifetime (TEXT("r.PhysicsField.Rendering.TransientLifetime"), GPhysicsFieldTransientLifetime, TEXT("Physics field transient commands lifetime for rendering.\n"), ECVF_RenderThreadSafe)
 

Function Documentation

◆ IMPLEMENT_GLOBAL_SHADER()

IMPLEMENT_GLOBAL_SHADER ( FPhysicsFieldRayMarchingCS  ,
"/Engine/Private/PhysicsFieldVisualizer.usf"  ,
"MainCS"  ,
SF_Compute   
)

◆ RenderPhysicsField()

void RenderPhysicsField ( FRDGBuilder GraphBuilder,
TArrayView< FViewInfo Views,
const FPhysicsFieldSceneProxy PhysicsFieldProxy,
FRDGTextureRef  SceneColorTexture 
)

Variable Documentation

◆ CVarPhysicsFieldEvalType

FAutoConsoleVariableRef CVarPhysicsFieldEvalType(TEXT("r.PhysicsField.Rendering.EvalType"), GPhysicsFieldEvalType, TEXT("Physics field boolean to check if we are evaluating exactly(0) or sampling(1) the field for visualisation.\n"), ECVF_RenderThreadSafe) ( TEXT("r.PhysicsField.Rendering.EvalType")  ,
GPhysicsFieldEvalType  ,
TEXT("Physics field boolean to check if we are evaluating exactly(0) or sampling(1) the field for visualisation.\n" ,
ECVF_RenderThreadSafe   
)

◆ CVarPhysicsFieldSystemType

FAutoConsoleVariableRef CVarPhysicsFieldSystemType(TEXT("r.PhysicsField.Rendering.SystemType"), GPhysicsFieldSystemType, TEXT("Physics field boolean to check if we want to display the CPU(0) or GPU(1) field.\n"), ECVF_RenderThreadSafe) ( TEXT("r.PhysicsField.Rendering.SystemType")  ,
GPhysicsFieldSystemType  ,
TEXT("Physics field boolean to check if we want to display the CPU(0) or GPU(1) field.\n" ,
ECVF_RenderThreadSafe   
)

◆ CVarPhysicsFieldTargetType

FAutoConsoleVariableRef CVarPhysicsFieldTargetType(TEXT("r.PhysicsField.Rendering.TargetType"), GPhysicsFieldTargetType, TEXT("Physics field target to be used in the viewport show options.\n"), ECVF_RenderThreadSafe) ( TEXT("r.PhysicsField.Rendering.TargetType")  ,
GPhysicsFieldTargetType  ,
TEXT("Physics field target to be used in the viewport show options.\n" ,
ECVF_RenderThreadSafe   
)

◆ CVarPhysicsFieldTransientLifetime

FAutoConsoleVariableRef CVarPhysicsFieldTransientLifetime(TEXT("r.PhysicsField.Rendering.TransientLifetime"), GPhysicsFieldTransientLifetime, TEXT("Physics field transient commands lifetime for rendering.\n"), ECVF_RenderThreadSafe) ( TEXT("r.PhysicsField.Rendering.TransientLifetime")  ,
GPhysicsFieldTransientLifetime  ,
TEXT("Physics field transient commands lifetime for rendering.\n" ,
ECVF_RenderThreadSafe   
)

◆ GPhysicsFieldEvalType

int32 GPhysicsFieldEvalType = 0

◆ GPhysicsFieldSystemType

int32 GPhysicsFieldSystemType = 0

◆ GPhysicsFieldTargetType

◆ GPhysicsFieldTransientLifetime

float GPhysicsFieldTransientLifetime = 3.0f