specular()

Lights Camera / Material Properties

Description

Sets the specular color of the materials used for shapes drawn to the screen.

Syntax

void specular(float r, float g, float b) void specular(color c)

Parameters

NameTypeDescription
rfloatred component
gfloatgreen component
bfloatblue component
ccolora color value

Returns

void

Related

Under the Hood

From Processing.h:

void specular(float r, float g, float b); void specular(color c);

Under the Hood

From Processing.cpp:

void PApplet::specular(float r, float g, float b) { GLfloat col[] = { lc(r), lc(g), lc(b), 1.0f }; glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, col); } void PApplet::specular(color c) { unsigned int v = c.value; specular((v >> 16 & 0xFF) / 255.f, (v >> 8 & 0xFF) / 255.f, (v & 0xFF) / 255.f); } specular((v >> 16 & 0xFF) / 255.f, (v >> 8 & 0xFF) / 255.f, (v & 0xFF) / 255.f);