Sets maximum frames per second cap for rendering.
Takes fps (maximum FPS limit, 0 = unlimited).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
fpsInt
Returns
Void
Quick Summary
Sets maximum frames per second cap for rendering.
Takes fps (maximum FPS limit, 0 = unlimited).
Returns nothing.
Technical Exegesis...
Sets maximum frames per second cap for rendering. Takes fps (maximum FPS limit as Int, typical values 30, 60, 120, 144, 0 = unlimited). Returns nothing. Limits DirectX 12 rendering frame rate to specified FPS by inserting frame time delays.
FPS capping: limits frames per second to specified value (renderer sleeps between frames to maintain target FPS, prevents excessive frame rates), purpose (reduce GPU/CPU usage, stabilize frame timing, reduce power consumption, match monitor refresh rate).
Sets maximum frames per second cap for rendering. Takes fps (maximum FPS limit as Int, typical values 30, 60, 120, 144, 0 = unlimited). Returns nothing. Limits DirectX 12 rendering frame rate to specified FPS by inserting frame time delays.
FPS capping: limits frames per second to specified value (renderer sleeps between frames to maintain target FPS, prevents excessive frame rates), purpose (reduce GPU/CPU usage, stabilize frame timing, reduce power consumption, match monitor refresh rate). 0 = unlimited (no FPS cap, render as fast as possible, useful for benchmarking max performance). Typical values: 30 FPS (minimum playable, low-end hardware, battery saving), 60 FPS (standard, smooth gameplay, matches most monitors), 120-144 FPS (high refresh rate monitors, competitive gaming), 240+ FPS (professional competitive, very high refresh rate monitors).
Frame time calculation: targetFrameTime = 1000 / fps milliseconds (60 FPS = 16.67ms, 30 FPS = 33.33ms, 120 FPS = 8.33ms), renderer sleeps if frame completes early (maintains consistent frame rate, prevents CPU spinning). VSync vs FPS cap: VSync synchronizes with monitor refresh (eliminates tearing, caps FPS to monitor Hz, adds input lag), FPS cap software limit (allows tearing but flexible, less input lag, useful when VSync unavailable or undesired).
Use cases: (1) Power saving (cap to 30 FPS for battery life), (2) Thermal management (cap to 60 FPS to reduce heat), (3) Consistent timing (cap to 60 FPS for stable physics/gameplay), (4) Monitor matching (cap to 144 FPS for 144Hz monitor). Common patterns: standard cap (b3dSetMaxFPS 60), unlimited (b3dSetMaxFPS 0), battery saver (b3dSetMaxFPS 30), high refresh (b3dSetMaxFPS 144).
Frame pacing: FPS cap improves frame pacing (consistent frame times, smooth visual experience), uncapped FPS variable frame times (stuttering possible, less predictable performance). Performance: minimal overhead (simple sleep/delay between frames), allows GPU/CPU to idle (reduces power and heat compared to unlimited FPS).
Related: b3dGetMaxFPS reads current FPS cap setting, b3dGetFPS reads actual current FPS (may be lower than cap if performance limited), b3dRenderWorld renders frame (frame rate limited by this function's cap).