RenderScale [scale#]
Parameters
| scale# (optional) - internal 3D resolution factor from 0.5 to 2.0; 1.0 (default) |
Description
|
Renders the 3D scene at a different resolution from the window. The window and all 2D drawing stay at full size; only the internal 3D resolution changes, and the result is scaled to the display by the final quality pass. Below 1.0 it is the classic performance lever - 0.75 renders about half the pixels and is often hard to spot in motion, making it ideal for a graphics options slider or for keeping a heavy scene smooth on weaker GPUs. Above 1.0 it supersamples for extra crispness at a real GPU cost. Values outside 0.5 to 2.0 are clamped (with a warning in the diagnostics log), and a non-finite value falls back to 1.0. Changing the scale rebuilds the internal targets and resets TAA history, so treat it as a settings change rather than something to animate per frame. For the full story, see the image-quality guide. Requires Extended mode. See also: AntiAliasMode, FrameLimit, TextureAnisotropy. |
Example
; RenderScale Example ; ------------------- ; Requires Extended mode. Graphics3D 640,480,0,2 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,2,-7 RotateEntity camera,10,0,0 light=CreateLight() RotateEntity light,45,45,0 ; A ring of colourful spinning gems; fine edges reveal the scale change For i=0 To 7 gem=CreateSphere(8) ScaleEntity gem,0.5,0.8,0.5 PositionEntity gem,Cos(i*45)*3,1.5,2+Sin(i*45)*3 EntityColor gem,255-i*20,80+i*20,120+i*15 Next hub=CreateCylinder() ScaleEntity hub,0.6,1.2,0.6 PositionEntity hub,0,1.2,2 EntityColor hub,230,180,60 scale#=1.0 While Not KeyDown(1) ; [ / ] lower or raise the internal 3D resolution (0.5 to 2.0) If KeyDown(26) And scale>0.5 Then scale=scale-0.005 If KeyDown(27) And scale<2.0 Then scale=scale+0.005 ; Render 3D at a fraction of the window size, then rescale RenderScale scale ; Keep the scene turning so shimmer and softness are visible TurnEntity hub,0,2,0 ; Arrow keys move the camera If KeyDown(200) Then MoveEntity camera,0,0,0.1 If KeyDown(208) Then MoveEntity camera,0,0,-0.1 If KeyDown(203) Then TurnEntity camera,0,1,0 If KeyDown(205) Then TurnEntity camera,0,-1,0 RenderWorld Text 0,0,"[ ]: render scale Arrow keys: move camera Esc: exit" Text 0,20,"RenderScale "+scale Text 0,40,"Internal 3D resolution: "+Int(640*scale)+"x"+Int(480*scale) Text 0,60,"Below 1.0 is faster but softer; above 1.0 supersamples" Flip Wend End
Index