OGLNormalShader (object)

バージョン 1.12.0 で追加.

The OGLNormalShader inherits the OGLInlineShader. It extends the OGLInlineShader for shading with flat colors, using the geometry normal for the diffuse.

Attributes

Name Type Description
positions Vec3 Geometry positions
normals Vec3 Geometry normals

OGLNormalShader OGLNormalShader OGLNormalShader OGLInlineShader OGLInlineShader OGLNormalShader->OGLInlineShader InlineEntityBase InlineEntityBase OGLInlineShader->InlineEntityBase InlineShader InlineShader OGLInlineShader->InlineShader InlineEntity InlineEntity InlineEntityBase->InlineEntity

/*
** Example: OGLNormalShader
*/

require InlineDrawing;
  
operator entry() {

  InlineDrawing draw = OGLInlineDrawing();
  InlineShader shader = draw.registerShader(OGLNormalShader);
  InlineMaterial mat = shader.getOrCreateMaterial('normals');
  
}

/*
** Output:


*/

Methods in detail

OGLNormalShader ( in OGLNormalShader other )

copy constructor


OGLNormalShader ( in String name )

default constructor taking a name


OGLNormalShader ()

default constructor


OGLNormalShader OGLNormalShader.clone? ()

clone method