Blender渲染
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.0 KiB

  1. <?php
  2. namespace Blobt\Luxcore\scene;
  3. include dirname(dirname(__FILE__)) . "/vendor/autoload.php";
  4. /**
  5. * 配置灯光策略
  6. */
  7. $lightStrategy = new render\LightStrategy(); //实例一个LightStrategy类对象,默认的灯光策略为 LOG_POWER
  8. $lightStrategy->type = render\LightStrategy::TYPE_UNIFORM; //修改灯光策略为 UNIFORM;
  9. // 现在修改灯光策略为 DLS_CACHE,并开启直接光缓存
  10. $lightStrategy = new render\cache\LightStrategy(); //当需要开启开直接光缓存时,灯光策略类型必须为 DLS_CACHE类型,因此cache\LightStrategy类 继承了 LightStrategy类,
  11. //并在重写的构造函数中设置 $type属性为 DLS_CACHE类型。
  12. $lightStrategy->persistentFile = "../Untitled.dlsc"; //设置设置直接光缓存文件保存路径
  13. echo $lightStrategy; //输出灯光策略配置参数
  14. ?>