; Extended mode. Space toggles one/33 active targets; Escape exits. ; Counters describe executed main-colour draw calls from the last Flip. Graphics3D 800,500,0,2 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,0,-6 light=CreateLight() RotateEntity light,30,20,0 base=CreateSphere(16) pose=CopyMesh(base) ScaleMesh pose,1,1.5,.7 UpdateNormals pose target=AddMorphTarget(base,pose,"Stretch",3) FreeEntity pose ; The additional targets capture zero offsets but still have active weights. For n=1 To 32 AddMorphTarget base,base,"Zero "+n,1 Next EntityColor base,80,180,240 fallback=False phase#=0 gpuDraws=0 cpuDraws=0 timer=CreateTimer(60) While Not KeyHit(1) WaitTimer timer If KeyHit(57) Then fallback=Not fallback phase=phase+2 SetMorphWeight base,0,.5+Sin(phase)*.4 For n=1 To 32 SetMorphWeight base,n,fallback*.1 Next RenderWorld Text 10,10,"Space: one / 33 active targets Escape: exit" Text 10,35,"33 active targets: "+fallback+" GPU draws: "+gpuDraws+" CPU draws: "+cpuDraws Text 10,455,"One active target uses GPU where supported. More than 32 uses the complete CPU path." Flip gpuDraws=RenderGPUMorphedDraws() cpuDraws=RenderCPUMorphedDraws() Wend FreeTimer timer FreeEntity base FreeEntity light FreeEntity camera EndGraphics End