Shader Switch 着色器转换

Introduction

引言

This shader is used for adding shading varation, such as different textures, when a material is shared over multiple objects. It can be chained with other Shader Switch nodes for more complex materials, where 10 variations are not enough and is designed to be controlled by user attribute data that has been assigned to the object.

这个着色器用于添加材质变化,比如不同的纹理,当一个材质被多个对象共享时。它可以与其他着色开关节点链接,用于更复杂的材质,其中10个变体是不够的,而是被设计成由分配给对象的用户属性数据控制。

Parameters

参数

Shader Selector

着色选择器

This value determines which shader from the shader switch list to execute. The value typically comes from an integer or scalar stored per object and is accessed via the Redshift Integer User Data or Redshift Scalar User Data shading nodes.

这个值决定要从着色器开关列表中执行哪个着色器。该值通常来自每个对象存储的整数或标量,可以通过 Redshift Integer User Data 或 Redshift Scalar User Data 着色节点访问。

This value can be greater than 10 (i.e. the maximum number of physical shader slots) when used in conjunction with the selector Offset bias parameter.

当与选择器偏移参数一起使用时,该值可以大于10(即物理着色器插槽的最大数量)。

This value can not be driven by bit-map textures. It is limited to per-object or per-vertex data.

此值不能由位图纹理驱动。它仅限于每个对象或每个顶点数据。

Offset

偏移量

This value is a bias that is applied to the Shader Selector value, to bring the shader selector into a valid range. For example, with a Shader Selector value of 15 and an Offset of 10, internally this will select Shader 5 to be executed.

这个值是应用于 Shader Selector 值的偏置,用于将 Shader 选择器置于一个有效的范围内。例如,使用着色器选择器值为15和偏移量为10,这将在内部选择着色器5来执行。

Shader 0-9

着色器0-9

These are the shader input slots that will be executed given the selector value. These slots can also be colors and do not have to have a shader connected to them.

这些是给定选择器值即将执行的着色器输入槽。这些插槽也可以是颜色的,并且不需要一个着色器连接到它们。

Default Shader

默认着色器

This is the resultant color or shader that will be executed if the Shader Selector value minus the Offset goes out of range (i.e. less than 0 or greater than 9).

如果着色选择器值减去偏移量超出范围(即小于0或大于9) ,将执行结果颜色或着色器。

0

赶快留个言打破零评论!~

返回顶部

显示

忘记密码?

显示

显示

获取验证码

Close