CommonSurfaceShader (Standard name: SurfaceShader)
Implements the Blinn-Phong BRDF with normal mapping and a perfect specular component.
Inheritance
Code
XML encoding
<CommonSurfaceShader logFeature='' alphaTextureChannelMask='a' alphaTextureCoordinatesId='0' alphaTextureId='-1' invertAlphaTexture='FALSE' alphaFactor='1' normalBias='-1 -1 -1' normalScale='2 2 2' textureTransformEnabled='0 0 0 0 0 0 0 0' fresnelBlend='0' relativeIndexOfRefraction='1' environmentTextureChannelMask='rgb' environmentTextureCoordinatesId='0' environmentTextureId='-1' environmentFactor='1 1 1' transmissionTextureCoordinatesId='0' transmissionTextureChannelMask='rgb' transmissionTextureId='-1' transmissionFactor='0 0 0' reflectionTextureCoordinatesId='0' reflectionTextureChannelMask='rgb' reflectionFactor='0 0 0' reflectionTextureId='-1' normalTextureChannelMask='rgb' normalTextureCoordinatesId='0' normalTextureId='-1' normalFormat='UNORM' normalSpace='TANGENT' shininessTextureChannelMask='a' shininessTextureId='-1' shininessTextureCoordinatesId='0' shininessFactor='0.2' specularTextureChannelMask='rgb' specularTextureCoordinatesId='0' specularTextureId='-1' specularFactor='0 0 0' diffuseTextureChannelMask='rgb' diffuseTextureId='-1' diffuseTextureCoordinatesId='0' diffuseFactor='0.8 0.8 0.8' ambientTextureChannelMask='rgb' ambientTextureCoordinatesId='0' ambientTextureId='-1' ambientFactor='0.2 0.2 0.2' emissiveTextureChannelMask='rgb' emissiveTextureCoordinatesId='0' emissiveTextureId='-1' emissiveFactor='0 0 0' tangentTextureCoordinatesId='-1' binormalTextureCoordinatesId='-1' />
Classic encoding
CommonSurfaceShader { logFeature [""] alphaTextureChannelMask "a" alphaTextureCoordinatesId 0 alphaTextureId -1 invertAlphaTexture FALSE alphaFactor 1 normalBias -1 -1 -1 normalScale 2 2 2 textureTransformEnabled [0 0 0 0 0 0 0 0] fresnelBlend 0 relativeIndexOfRefraction 1 environmentTextureChannelMask "rgb" environmentTextureCoordinatesId 0 environmentTextureId -1 environmentFactor 1 1 1 transmissionTextureCoordinatesId 0 transmissionTextureChannelMask "rgb" transmissionTextureId -1 transmissionFactor 0 0 0 reflectionTextureCoordinatesId 0 reflectionTextureChannelMask "rgb" reflectionFactor 0 0 0 reflectionTextureId -1 normalTextureChannelMask "rgb" normalTextureCoordinatesId 0 normalTextureId -1 normalFormat "UNORM" normalSpace "TANGENT" shininessTextureChannelMask "a" shininessTextureId -1 shininessTextureCoordinatesId 0 shininessFactor 0.2 specularTextureChannelMask "rgb" specularTextureCoordinatesId 0 specularTextureId -1 specularFactor 0 0 0 diffuseTextureChannelMask "rgb" diffuseTextureId -1 diffuseTextureCoordinatesId 0 diffuseFactor 0.8 0.8 0.8 ambientTextureChannelMask "rgb" ambientTextureCoordinatesId 0 ambientTextureId -1 ambientFactor 0.2 0.2 0.2 emissiveTextureChannelMask "rgb" emissiveTextureCoordinatesId 0 emissiveTextureId -1 emissiveFactor 0 0 0 tangentTextureCoordinatesId -1 binormalTextureCoordinatesId -1 }
Interface
Filter: X3D only | Avalon only | All
id | Name | DataType | PartType | Default | ValueType | Description |
---|---|---|---|---|---|---|
tangentTextureCoordinatesId | SFInt32 | inputOutput | -1 | Texture coordinate channel that contains the tangents in u. | ||
binormalTextureCoordinatesId | SFInt32 | inputOutput | -1 | Texture coordinate channel that contains the tangents in v. | ||
emissiveFactor | SFVec3f | inputOutput | 0 0 0 | The value of emissiveTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
emissiveTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
emissiveTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for emissiveTexture. | ||
emissiveTextureChannelMask | SFString | inputOutput | rgb | ChannelMask for emissiveTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
ambientFactor | SFVec3f | inputOutput | 0.2 0.2 0.2 | The value of ambientTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
ambientTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
ambientTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for ambientTexture. | ||
ambientTextureChannelMask | SFString | inputOutput | rgb | ChannelMask for ambientTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
diffuseFactor | SFVec3f | inputOutput | 0.8 0.8 0.8 | The value of diffuseTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
diffuseTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
diffuseTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for diffuseTexture. | ||
diffuseTextureChannelMask | SFString | inputOutput | rgb | ChannelMask for diffuseTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
specularFactor | SFVec3f | inputOutput | 0 0 0 | The value of specularTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
specularTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
specularTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for specularTexture. | ||
specularTextureChannelMask | SFString | inputOutput | rgb | ChannelMask for specularTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
shininessFactor | SFFloat | inputOutput | 0.2 | The value of shininessTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
shininessTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
shininessTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for shininessTexture. | ||
shininessTextureChannelMask | SFString | inputOutput | a | ChannelMask for shininessTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
normalFormat | SFString | inputOutput | UNORM | How normals are stored in normalTexture. Currently only "UNORM" (each component packed into a [0,1] color channel) is supported. | ||
normalSpace | SFString | inputOutput | TANGENT | Space in which normals in normalTexture are defined. Currently only "TANGENT" (a default tangent space normal map) is supported. | ||
normalTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
normalTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for normalTexture. | ||
normalTextureChannelMask | SFString | inputOutput | rgb | ChannelMask for normalTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
reflectionFactor | SFVec3f | inputOutput | 0 0 0 | The value of reflectionTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
reflectionTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
reflectionTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for reflectionTexture. | ||
reflectionTextureChannelMask | SFString | inputOutput | rgb | ChannelMask for reflectionTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
transmissionFactor | SFVec3f | inputOutput | 0 0 0 | The value of transmissionTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
transmissionTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
transmissionTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for transmissionTexture. | ||
transmissionTextureChannelMask | SFString | inputOutput | rgb | ChannelMask for transmissionTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
environmentFactor | SFVec3f | inputOutput | 1 1 1 | The value of environmentTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
environmentTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
environmentTextureCoordinatesId | SFInt32 | inputOutput | 0 | [Currently not used, coordinates are computed in shader.] | ||
environmentTextureChannelMask | SFString | inputOutput | rgb | ChannelMask for environmentTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
relativeIndexOfRefraction | SFFloat | inputOutput | 1 | Relative IOR for perfect specular component. | ||
fresnelBlend | SFFloat | inputOutput | 0 | To what degree the Fresnel equation for dielectrics should be used to blend the perfect specular reflection and transmission. | ||
emissiveTexture | SFNode | inputOutput | Texture containing emissive component. | |||
ambientTexture | SFNode | inputOutput | Texture containing ambient component. | |||
diffuseTexture | SFNode | inputOutput | Texture containing diffuse component. | |||
specularTexture | SFNode | inputOutput | Texture containing specular component. | |||
shininessTexture | SFNode | inputOutput | Texture containing shininess component. | |||
normalTexture | SFNode | inputOutput | Texture containing normal component for normal mapping. | |||
reflectionTexture | SFNode | inputOutput | AppearanceProperty | Texture containing reflection component. Perfect specular reflection is modulated by this. | ||
transmissionTexture | SFNode | inputOutput | Texture containing transmission component. Perfect specular transmission is modulated by this. | |||
environmentTexture | SFNode | inputOutput | Cube texture containing the environment for perfect specular reflection and transmission. | |||
textureTransformEnabled | MFBool | initializeOnly | 0 0 0 0 0 0 0 0 | defines if the OpenGL texture transform for a texture coordinate channel should be applied. This transform is applied in the vertex shader before the transformsassiciated with the textures are applied. | ||
normalScale | SFVec3f | initializeOnly | 2 2 2 | scale to apply to normal sampled from normalTexture | ||
normalBias | SFVec3f | initializeOnly | -1 -1 -1 | Bias to apply to normal sampled from normalTexture | ||
alphaFactor | SFFloat | inputOutput | 1 | The value of alphaTexture is multiplied by this value. If no texture is set, the value is used directly. | ||
invertAlphaTexture | SFBool | inputOutput | FALSE | If true, (1-sampledValue) is used as alpha. If false the sampled value is used. | ||
alphaTextureId | SFInt32 | inputOutput | -1 | The texture unit. | ||
alphaTextureCoordinatesId | SFInt32 | inputOutput | 0 | Texture coordinate channel to use for alphaTexture. | ||
alphaTextureChannelMask | SFString | inputOutput | a | ChannelMask for alphaTexture in the form of a glsl swizzle (e.g. "rgb", "a"). | ||
alphaTexture | SFNode | inputOutput | Texture containing alpha component. | |||
isSelected | SFBool | outputOnly | The isSelected output field is used to indicate that this shader instance is the one selected for use by the browser. A TRUE value indicates that this instance is in use. | |||
isValid | SFBool | outputOnly | The isValid field is used to indicate whether the current shader objects can be run as a shader program. | |||
activate | SFBool | inputOnly | The activate field forces the shader to activate the contained objects. | |||
logFeature | MFString | inputOutput | state, child, parent, route, eventIn, eventOut | controls the logging of changes, state: log state changes (e.g. live), child: log child add/remove, parent: log parent add/remove, route: log route add/remove; eventIn: log receiving of events, eventOut: log sending of events: guiView, runtime system should create node-view, guiEdit: runtime system should create node-editeverything: log everything | ||
metadata | SFNode | inputOutput | MetadataObject | container for payload metadata inside MetadataSet element |