通过将顶点属性显示为用于调试的颜色,将其可视化。
Components for well-known unit-length vectors, i.e., normal
,
tangent
, and bitangent
, are scaled and biased
from [-1.0, 1.0] to (-1.0, 1.0).
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 具有以下属性的对象:
|
Throws:
-
DeveloperError : 选项.glslDatatype必须是float、vec2、vec3或vec4。
Example:
var primitive = new Cesium.Primitive({
geometryInstances : // ...
appearance : new Cesium.DebugAppearance({
attributeName : 'normal'
})
});
Members
正在可视化的属性的名称。
当
true
时,几何图形将关闭。-
Default Value:
false
片段着色器的GLSL源代码。完整片段着色器
源代码的构建过程中考虑了
DebugAppearance#material
。
使用DebugAppearance#getFragmentShaderSource
获取完整源代码。正在可视化的属性的GLSL数据类型。
material : Material
此属性是
Appearance
接口的一部分,但不是
6866完全使用了自定义着色器6166。-
Default Value:
undefined
WebGL修复了渲染几何体时要使用的函数状态。
当
true
时,几何体看起来是半透明的。-
Default Value:
false
顶点着色器的GLSL源代码。
Methods
返回完整的GLSL片段着色器源,对于
DebugAppearance
来说
DebugAppearance#fragmentShaderSource
Returns:
完整的GLSL片段着色器源。
创建渲染状态。这不是最终渲染状态实例;而是,
它可以包含与渲染状态相同的渲染状态属性子集
在上下文中创建。
Returns:
渲染状态。
基于
DebugAppearance#translucent
确定几何体是否半透明。Returns:
如果外观是半透明的,则为
true
。