|
@ -11,57 +11,10 @@ class LightStrategy extends BaseCfg |
|
|
const TYPE_DLS_CACHE = 'DLS_CACHE'; |
|
|
const TYPE_DLS_CACHE = 'DLS_CACHE'; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @var string 使用何种灯光策略(可取值是 LOG_POWER、POWER、UNIFORM、DLS_CACHE 四个字符串之一,当值是DLS_CACHE时,直接光子缓存配置参数开启) |
|
|
|
|
|
|
|
|
* @var string 使用何种灯光策略(可取值是 LOG_POWER、POWER、UNIFORM、DLS_CACHE 四个字符串之一,当值是 DLS_CACHE 时,直接光子缓存配置参数开启) |
|
|
*/ |
|
|
*/ |
|
|
public $type = self::TYPE_LOG_POWER; |
|
|
public $type = self::TYPE_LOG_POWER; |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @var float 光照阈值,(取值:0-1的小数) |
|
|
|
|
|
*/ |
|
|
|
|
|
public $lightthreshold; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @var float 目标缓存比率,(取值:0-1的小数) |
|
|
|
|
|
*/ |
|
|
|
|
|
public $targetcachehitratio; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @var integer 最大深度,(取值:大于等于0的整数) |
|
|
|
|
|
*/ |
|
|
|
|
|
public $maxdepth; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @var integer 最大采样数,(取值:大于等于0的整数,默认1000万) |
|
|
|
|
|
*/ |
|
|
|
|
|
public $maxsamplescount; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @var string 直接光缓存文件的路径用文件名 |
|
|
|
|
|
*/ |
|
|
|
|
|
public $persistentFile; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @var object 储存个Entry类对象 |
|
|
|
|
|
*/ |
|
|
|
|
|
public $entry; |
|
|
|
|
|
|
|
|
|
|
|
public function openLightCache() |
|
|
|
|
|
{ |
|
|
|
|
|
$this->type = self::TYPE_DLS_CACHE; |
|
|
|
|
|
$this->maxdepth = 4; |
|
|
|
|
|
$this->maxsamplescount = 1e+07; |
|
|
|
|
|
$this->persistentFile = "C:\Users\ADMINI~1\AppData\Local\Temp\Untitled.dlsc"; |
|
|
|
|
|
$this->entry = new Entry(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function closeLightCache() |
|
|
|
|
|
{ |
|
|
|
|
|
$this->type = self::TYPE_LOG_POWER; |
|
|
|
|
|
$this->maxdepth = null; |
|
|
|
|
|
$this->maxsamplescount = null; |
|
|
|
|
|
$this->persistentFile = null; |
|
|
|
|
|
$this->entry = null; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
?>
|
|
|
?>
|