Class: MotionBlurUtil
Defined in: src/util/MotionBlurUtil.ts:8
CPU mirror of the velocity math in MotionBlur_cs, for tooling and tests.
Constructors
Constructor
new MotionBlurUtil():
MotionBlurUtil
Returns
MotionBlurUtil
Methods
projectToUV()
staticprojectToUV(worldPos,viewProj): [number,number]
Defined in: src/util/MotionBlurUtil.ts:13
Project a world position to screen UV (0..1, origin top-left) with a column-major view-projection matrix. Returns null behind the camera.
Parameters
worldPos
viewProj
Returns
[number, number]
velocityPixels()
staticvelocityPixels(worldPos,currViewProj,prevViewProj,width,height,scale?,maxBlurPixels?): [number,number]
Defined in: src/util/MotionBlurUtil.ts:28
Blur vector in pixels for a world-space point: how far it moved on screen between the previous and the current view-projection, times scale, clamped to maxBlurPixels.
Parameters
worldPos
currViewProj
prevViewProj
width
number
height
number
scale?
number = 1
maxBlurPixels?
number = Infinity
Returns
[number, number]
shutterScale()
staticshutterScale(intensity,deltaMs,frameRateIndependent):number
Defined in: src/util/MotionBlurUtil.ts:39
Shutter scale actually sent to the shader for a given frame time.
Parameters
intensity
number
deltaMs
number
frameRateIndependent
boolean
Returns
number

