Version:

Dither Gradient Modifier 组件

Dither Gradient Modifier 组件将 有序抖动 算法应用于梯度。

提供方

Gradient Signal Gem

Dither Gradient Modifier 属性

Dither Gradient Modifier component properties

属性说明默认值
Preview显示该组件应用所有属性后的输出渐变效果。
Pin Preview to Shape设置一个具有兼容Shape组件的实体,以便在Constrain to ShapeEnabled时用作预览的边界。EntityIdCurrent Entity
Preview Position设置预览的世界位置。

只有在Pin Preview to Shape中没有选择实体时,此字段才可用。
Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Preview Size设置预览的尺寸。Vector3: 0.0 to InfinityX:1.0, Y:1.0, Z:1.0
Constrain to Shape如果Enabled,渐变预览将使用在Pin Preview to Shape中选择的实体的边界。

此字段仅在Pin Preview to Shape中选择了实体时可用。
BooleanDisabled
Pattern Offset移动模式的查找索引。Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Pattern Type设置抖动效果的模式。4x4 or 8x84x4
Sample Settings - Use System Points Per Unit如果EnabledPoints Per Unit 会自动设置为扇区密度除以扇区大小。BooelanEnabled
Sample Settings - Points Per Unit设置梯度采样前缩放输入位置的值。0.001 to Infinity1.0
Gradient请参阅下面的 Gradient 属性

Gradient 属性

Gradient properties

属性说明默认值
Gradient Entity Id设置具有活动 Gradient 组件的实体。EntityIdNone
Opacity设置输入渐变的不透明度。Float: 0.0 - 1.01.0
Invert Input反转输入梯度的值。BooleanDisabled
Preview (Input)显示由 Gradient Entity Id 中设置的实体提供的渐变。
Enable Transform如果Enabled,则可以修改输入梯度的平移、缩放和旋转。BooleanDisabled
Translate设置输入梯度的平移。Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Scale设置输入梯度的比例。Vector3: 0.0001 to InfinityX:1.0, Y:1.0, Z:1.0
Rotate设置输入梯度的旋转角度。Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Enable Levels如果 Enabled,则可以修改输入梯度的输入值和输出值。BooleanDisabled
Input Mid设置输入梯度的中值。Float: 0.0 - 1.01.0
Input Min设置输入梯度的最小值。Float: 0.0 - 1.00.0
Input Max设置输入梯度的最大值。Float: 0.0 - 1.01.0
Output Min设置输出梯度的最小值。Float: 0.0 - 1.00.0
Output Max设置输出梯度的最大值。Float: 0.0 - 1.01.0

DitherGradientRequestBus

使用以下带有 DitherGradientRequestBus EBus 接口的请求函数与游戏中的 Dither Gradient Modifier 组件进行通信。

方法名称说明参数返回值脚本化
GetGradientSampler返回抖动梯度的梯度采样器对象。NoneGradient SamplerYes
GetPatternOffset返回Pattern Offset的值。NoneOffset: Vector3Yes
GetPatternType返回Pattern Type的值。NonePattern Type Index: IntegerYes
GetPointsPerUnit返回Points Per Unit的值。NonePoints: FloatYes
GetUseSystemPointsPerUnit返回 Use System Points Per Unit的值。NoneBooleanYes
SetPatternOffset设置Pattern Offset的值。Offset: Vector3NoneYes
SetPatternType设置Pattern Type的值。Pattern Type Index: IntegerNoneYes
SetPointsPerUnit设置Points Per Unit的值。Points: FloatNoneYes
SetUseSystemPointsPerUnit设置Use System Points Per Unit的值。BooleanNoneYes