((AbstractCamera) cam).update();
if( !freeze ) { for( int i = 0; i < dynamicObjects.size(); i++ ) { DynamicObject dynamicObject = dynamicObjects.get( i ); Matrix4f modelMatrix = dynamicObject.modelMatrix; Spatial spatial = dynamicObject.spatial;
	public void doRender( Renderer r ) {		if( !useCurrentScene && spatials.size() == 0 ) {			return;		}		// see if we should use the current scene to bloom, or only things added to the pass.		if( useCurrentScene ) {			// grab backbuffer to texture			tRenderer.copyBufferToTexture( mainTexture,										   DisplaySystem.getDisplaySystem().getWidth(),										   DisplaySystem.getDisplaySystem().getHeight(),										   1 );		}		else {			//Render scene to texture			tRenderer.updateCamera();			tRenderer.render( spatialsRenderNode, mainTexture );		}		Renderer.enforceState( motionBlurShader );		Renderer.enforceState( tsObj );		Renderer.enforceState( cullObj );		for( int i = 0; i < dynamicObjects.size(); i++ ) {			DynamicObject dynamicObject = dynamicObjects.get( i );			motionBlurShader.setUniform( "prevModelViewMatrix", dynamicObject.modelViewMatrix, false );			motionBlurShader.setUniform( "prevModelViewProjectionMatrix", dynamicObject.modelViewProjectionMatrix, false );			motionBlurShader.setUniform( "blurStrength", blurStrength / tpf );			motionBlurShader.apply();			r.draw( dynamicObject.spatial );			r.renderQueue();		}		Renderer.clearEnforcedState( RenderState.RS_GLSL_SHADER_OBJECTS );		Renderer.clearEnforcedState( RenderState.RS_TEXTURE );		Renderer.clearEnforcedState( RenderState.RS_CULL );		((AbstractCamera) cam).update();		projectionMatrix.set( ((AbstractCamera) cam).getProjectionMatrix() );		for( int i = 0; i < dynamicObjects.size(); i++ ) {			DynamicObject dynamicObject = dynamicObjects.get( i );			Matrix4f modelMatrix = dynamicObject.modelMatrix;			Matrix4f modelViewMatrix = dynamicObject.modelViewMatrix;			Matrix4f modelViewProjectionMatrix = dynamicObject.modelViewProjectionMatrix;			Spatial spatial = dynamicObject.spatial;			if( !freeze ) {				modelMatrix.loadIdentity();				spatial.getWorldRotation().toRotationMatrix( tmpMatrix );				modelMatrix.multLocal( tmpMatrix );				modelMatrix.m00 *= spatial.getWorldScale().x;				modelMatrix.m11 *= spatial.getWorldScale().y;				modelMatrix.m22 *= spatial.getWorldScale().z;				modelMatrix.setTranslation( spatial.getWorldTranslation() );				modelMatrix.transpose();			}			modelViewMatrix.set( modelMatrix );			modelViewMatrix.multLocal( ((AbstractCamera) cam).getModelViewMatrix() );			modelViewProjectionMatrix.set( modelViewMatrix ).multLocal( projectionMatrix );		}	}