|
|
@ -274,42 +274,13 @@ $scene->registerCamera($camera); |
|
|
|
|
|
|
|
|
|
|
|
// 四、设置渲染参数
|
|
|
|
// // gpu 渲染
|
|
|
|
// $render = '';
|
|
|
|
// $renderEngine = new RenderEngine();
|
|
|
|
// $render .= $renderEngine;
|
|
|
|
|
|
|
|
// $openCL = new OpenCL();
|
|
|
|
// $render .= $openCL;
|
|
|
|
|
|
|
|
// $lightStrategy = new LightStrategy();
|
|
|
|
// $render .= $lightStrategy;
|
|
|
|
|
|
|
|
// $path = new Path();
|
|
|
|
// $render .= $path;
|
|
|
|
|
|
|
|
// $sampler = new Sampler();
|
|
|
|
// $render .= $sampler;
|
|
|
|
|
|
|
|
// $filesaver = new FileSaver();
|
|
|
|
// $render .= $filesaver;
|
|
|
|
|
|
|
|
// $batch = new Batch();
|
|
|
|
// $batch->haltspp = 200;
|
|
|
|
// // $batch->halttime = 2000;
|
|
|
|
// $render .= $batch;
|
|
|
|
|
|
|
|
// $sceneCfg = new render\Scene();
|
|
|
|
// $render .= $sceneCfg;
|
|
|
|
|
|
|
|
// cpu 渲染
|
|
|
|
// gpu 渲染
|
|
|
|
$render = ''; |
|
|
|
$renderEngine = new RenderEngine(); |
|
|
|
$renderEngine->type = RenderEngine::TYPE_PATHCPU; |
|
|
|
$render .= $renderEngine; |
|
|
|
|
|
|
|
$native = new Native(); |
|
|
|
$render .= $native; |
|
|
|
$openCL = new OpenCL(); |
|
|
|
$render .= $openCL; |
|
|
|
|
|
|
|
$lightStrategy = new LightStrategy(); |
|
|
|
$render .= $lightStrategy; |
|
|
@ -321,7 +292,6 @@ $sampler = new Sampler(); |
|
|
|
$render .= $sampler; |
|
|
|
|
|
|
|
$filesaver = new FileSaver(); |
|
|
|
$filesaver->renderengineType = FileSaver::TYPE_PATHCPU; |
|
|
|
$render .= $filesaver; |
|
|
|
|
|
|
|
$batch = new Batch(); |
|
|
@ -332,6 +302,36 @@ $render .= $batch; |
|
|
|
$sceneCfg = new render\Scene(); |
|
|
|
$render .= $sceneCfg; |
|
|
|
|
|
|
|
// // cpu 渲染
|
|
|
|
// $render = '';
|
|
|
|
// $renderEngine = new RenderEngine();
|
|
|
|
// $renderEngine->type = RenderEngine::TYPE_PATHCPU;
|
|
|
|
// $render .= $renderEngine;
|
|
|
|
|
|
|
|
// $native = new Native();
|
|
|
|
// $render .= $native;
|
|
|
|
|
|
|
|
// $lightStrategy = new LightStrategy();
|
|
|
|
// $render .= $lightStrategy;
|
|
|
|
|
|
|
|
// $path = new Path();
|
|
|
|
// $render .= $path;
|
|
|
|
|
|
|
|
// $sampler = new Sampler();
|
|
|
|
// $render .= $sampler;
|
|
|
|
|
|
|
|
// $filesaver = new FileSaver();
|
|
|
|
// $filesaver->renderengineType = FileSaver::TYPE_PATHCPU;
|
|
|
|
// $render .= $filesaver;
|
|
|
|
|
|
|
|
// $batch = new Batch();
|
|
|
|
// $batch->haltspp = 200;
|
|
|
|
// // $batch->halttime = 2000;
|
|
|
|
// $render .= $batch;
|
|
|
|
|
|
|
|
// $sceneCfg = new render\Scene();
|
|
|
|
// $render .= $sceneCfg;
|
|
|
|
|
|
|
|
// 图像输出设置
|
|
|
|
$imageOutPath = $sceneTemplatePath.'/imageOut'; |
|
|
|
$film = new Film(); |
|
|
|