Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.
JavaScript 3d3d-assets3d-modelingagent-skillsagent-toolsai-agentsasset-pipelinecligame-assetsglbgltfmcpmcp-servermodel-context-protocolprocedural-generationprocedural-modelingtext-to-3dthreejstypescript
/**
* Three's public output-target path renders into its HalfFloat HDR framebuffer,
* then applies tone mapping/exposure and the display color-space conversion.
* An ordinary byte render target bypasses that pass and clips linear highlights.
*/
export function renderDisplayTarget(renderer, scene, camera, target) {
const previousTarget = renderer.getRenderTarget();
const previousOutput = renderer.getOutputRenderTarget();
try {
renderer.setOutputRenderTarget(target);
// A null ordinary target is required to enable Three's internal output pass.
renderer.setRenderTarget(null);
renderer.render(scene, camera);
} finally {
renderer.setRenderTarget(previousTarget);
renderer.setOutputRenderTarget(previousOutput);
}
}