OGLFlatShader.kl¶
Types¶
OGLFlatShader (object)¶
バージョン 1.12.0 で追加.
The OGLFlatShader inherits the OGLInlineShader. It extends the OGLInlineShader for shading with flat colors.
Uniforms¶
Name | Type | Description | Default |
---|---|---|---|
u_color | Color | The diffuse color | Color(1.0, 0.0, 0.0) |
Attributes¶
Name | Type | Description |
---|---|---|
positions | Vec3 | Geometry positions |
/*
** Example: OGLFlatShader
*/
require InlineDrawing;
operator entry() {
InlineDrawing draw = OGLInlineDrawing();
InlineShader shader = draw.registerShader(OGLFlatShader);
InlineMaterial mat = shader.getOrCreateMaterial('green');
mat.setUniform('u_color', Color(0.0, 1.0, 0.0));
}
/*
** Output:
*/
Methods¶
OGLFlatShader ( in OGLFlatShader other ) | |
OGLFlatShader ( in String name ) | |
OGLFlatShader () | |
OGLFlatShader | clone ? () |