fx.Cascade.UseVelocityForMotionBlur

fx.Cascade.UseVelocityForMotionBlur

#Overview

name: fx.Cascade.UseVelocityForMotionBlur

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of fx.Cascade.UseVelocityForMotionBlur is to control whether velocity should be used to approximate motion blur for particle systems in Unreal Engine’s Cascade particle system.

This setting variable is primarily used in the particle system and rendering subsystems of Unreal Engine. Based on the callsites, it’s specifically utilized in the Engine module, within the particle system implementation.

The value of this variable is set as a console variable (CVar) with a default value of true. It can be modified at runtime through console commands or programmatically.

The associated variable CVarFxCascadeUseVelocityForMotionBlur directly interacts with fx.Cascade.UseVelocityForMotionBlur. They share the same value and purpose.

Developers should be aware that this variable affects the visual quality and performance of particle systems. When enabled, it can provide more accurate motion blur for particles, potentially improving visual fidelity at the cost of some performance.

Best practices when using this variable include:

  1. Consider the performance impact when enabling this feature, especially for complex particle systems or on lower-end hardware.
  2. Test the visual difference with the setting on and off to determine if the quality improvement justifies any potential performance cost.
  3. Use this in conjunction with other motion blur settings for a consistent visual style across the game.

Regarding the associated variable CVarFxCascadeUseVelocityForMotionBlur:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Particles/ParticleModules.cpp:89

Scope: file

Source code excerpt:


static TAutoConsoleVariable<bool> CVarFxCascadeUseVelocityForMotionBlur(
	TEXT("fx.Cascade.UseVelocityForMotionBlur"),
	true,
	TEXT("When enabled velocity will be used to approximate velocity for vertex factories that support this.")
);

/*-----------------------------------------------------------------------------
	Abstract base modules used for categorization.

#Associated Variable and Callsites

This variable is associated with another variable named CVarFxCascadeUseVelocityForMotionBlur. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Particles/ParticleModules.cpp:88

Scope: file

Source code excerpt:

#include "StaticMeshResources.h"

static TAutoConsoleVariable<bool> CVarFxCascadeUseVelocityForMotionBlur(
	TEXT("fx.Cascade.UseVelocityForMotionBlur"),
	true,
	TEXT("When enabled velocity will be used to approximate velocity for vertex factories that support this.")
);

/*-----------------------------------------------------------------------------

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Particles/ParticleModules.cpp:1321

Scope (from outer to inner):

file
function     bool UParticleModuleRequired::ShouldUseVelocityForMotionBlur

Source code excerpt:

		return bUseVelocityForMotionBlur;
	}
	return CVarFxCascadeUseVelocityForMotionBlur.GetValueOnAnyThread();
}

void UParticleModuleRequired::InitBoundingGeometryBuffer()
{
	// The SRV is only needed for platforms that can render particles with instancing
	if (BoundingGeometryBuffer->Vertices->Num())