OGLCurveShader (object)

バージョン 1.12.0 で追加.

The OGLCurveShader inherits the OGLInlineShader. It extends the OGLInlineShader for shading with a simple phong model.

Uniforms

Name Type Description Default
u_light0Position Vec3 Position of the first light Position of the camera
u_light0Color Color Color of the first light Color(1.0, 1.0, 1.0)
u_ambientColor Color Ambient color component Color(0.05, 0.05, 0.05)
u_diffuseColor Color Diffuse color component Color(0.0, 1.0, 0.0)
u_specularColor Color Specular color component Color(0.2, 0.2, 0.2)
u_specularFactor Color Specular distribution factor 16.0

Attributes

Name Type Description
positions Vec3 Geometry positions
tangents Vec3 Curve tangents

OGLCurveShader OGLCurveShader OGLCurveShader OGLInlineShader OGLInlineShader OGLCurveShader->OGLInlineShader InlineEntityBase InlineEntityBase OGLInlineShader->InlineEntityBase InlineShader InlineShader OGLInlineShader->InlineShader InlineEntity InlineEntity InlineEntityBase->InlineEntity

/*
** Example: OGLCurveShader
*/

require InlineDrawing;
  
operator entry() {

  InlineDrawing draw = OGLInlineDrawing();
  InlineShader shader = draw.registerShader(OGLCurveShader());
  InlineMaterial mat = shader.getOrCreateMaterial('blue');
  mat.setUniform('u_diffuseColor', Color(0.0, 0.0, 1.0));
  
}

/*
** Output:


*/

Methods

  OGLCurveShader ( in OGLCurveShader other )
  OGLCurveShader ( in String name )
  OGLCurveShader ()
OGLCurveShader clone ? ()

Methods in detail

OGLCurveShader ( in OGLCurveShader other )

copy constructor


OGLCurveShader ( in String name )

default constructor taking a name


OGLCurveShader ()

default constructor


OGLCurveShader OGLCurveShader.clone? ()

clone method