OGLNormalShader.kl

Types

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
/*
** Example: OGLNormalShader
*/

require InlineDrawing;
  
operator entry() {

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

/*
** Output:


*/