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