PointLight.LinearAttenuation 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
光衰减等式中的线性系数,用于确定光如何随距离下降。
public:
property float LinearAttenuation { float get(); void set(float value); };
float LinearAttenuation();
void LinearAttenuation(float value);
public float LinearAttenuation { get; set; }
var single = pointLight.linearAttenuation;
pointLight.linearAttenuation = single;
Public Property LinearAttenuation As Single
属性值
Single
float
光衰减等式中的线性系数,用于确定光如何随距离下降。 范围为 0 到无穷大。
示例
_pointLight.LinearAttenuation = .14F;
注解
PointLight.LinearAttenuation 属性是衰减等式的一部分,该公式还包含 PointLight.ConstantAttenuation 和 PointLight.QuadraticAttenuation:
![1/ (常量+线性* (距离/100) +二次* (距离/100) * (距离/100) )](microsoft.ui.composition/images/attenuationequation.png?view=windows-app-sdk-1.5)
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈