Browse Source

渲染测式 开发

master
yuanjiajia 1 year ago
parent
commit
d3c2d59b1e
  1. 74
      examples/matRenderTest.php

74
examples/matRenderTest.php

@ -179,45 +179,15 @@ $scene->registerCamera($camera);
// 四、设置渲染参数 // 四、设置渲染参数
// gpu 渲染
$render = '';
$renderEngine = new RenderEngine();
$render .= $renderEngine;
$openCL = new OpenCL();
// $openCL->cpuUse = OpenCL::CLOSE;
// $openCL->nativeThreadsCount = 0;
$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 = 4000;
// $batch->halttime = 2000;
$render .= $batch;
$sceneCfg = new render\Scene();
$render .= $sceneCfg;
// // cpu 渲染
// // gpu 渲染
// $render = ''; // $render = '';
// $renderEngine = new RenderEngine(); // $renderEngine = new RenderEngine();
// $renderEngine->type = RenderEngine::TYPE_PATHCPU;
// $render .= $renderEngine; // $render .= $renderEngine;
// $native = new Native();
// $render .= $native;
// $openCL = new OpenCL();
// // $openCL->cpuUse = OpenCL::CLOSE;
// // $openCL->nativeThreadsCount = 0;
// $render .= $openCL;
// $lightStrategy = new LightStrategy(); // $lightStrategy = new LightStrategy();
// $render .= $lightStrategy; // $render .= $lightStrategy;
@ -229,11 +199,10 @@ $render .= $sceneCfg;
// $render .= $sampler; // $render .= $sampler;
// $filesaver = new FileSaver(); // $filesaver = new FileSaver();
// $filesaver->renderengineType = FileSaver::TYPE_PATHCPU;
// $render .= $filesaver; // $render .= $filesaver;
// $batch = new Batch(); // $batch = new Batch();
// $batch->haltspp = 200;
// $batch->haltspp = 4000;
// // $batch->halttime = 2000; // // $batch->halttime = 2000;
// $render .= $batch; // $render .= $batch;
@ -241,6 +210,37 @@ $render .= $sceneCfg;
// $render .= $sceneCfg; // $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 = 2000;
// $batch->halttime = 2000;
$render .= $batch;
$sceneCfg = new render\Scene();
$render .= $sceneCfg;
// 图像输出设置 // 图像输出设置
$imageOutDir = $sceneTemplatePath.'/imageOut'; $imageOutDir = $sceneTemplatePath.'/imageOut';
$film = new Film(); $film = new Film();

Loading…
Cancel
Save