edu.utexas.cs.sdao.reyes.shading

ColorShaders

object ColorShaders

Contains pre-defined color shaders.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ColorShaders
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type ColorShader = (Vector3, Vector3, Vector2, Projection) ⇒ Color

    A function that takes: (1) the point of the vertex, (2) the normal at the vertex, (3) the UV coordinate of the vertex, and (4) the projection from world coordinates to the eye, returning a color.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val DEFAULT: (Vector3, Vector3, Vector2, Projection) ⇒ Color

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def checker(c: (Vector3, Vector3, Vector2, Projection) ⇒ Color, d: (Vector3, Vector3, Vector2, Projection) ⇒ Color): (Vector3, Vector3, Vector2, Projection) ⇒ Color

    Creates a shader with a checkerboard pattern that alternates between two shaders.

    Creates a shader with a checkerboard pattern that alternates between two shaders.

    c

    the first shader

    d

    the second shader

    returns

    a checkboard shader

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def lambert(m: ColorMap, lights: Vector[Light]): (Vector3, Vector3, Vector2, Projection) ⇒ Color

    Creates a diffuse (Lambertian) shader with the specified surface map and the specified light.

    Creates a diffuse (Lambertian) shader with the specified surface map and the specified light.

    m

    the surface map sampled for colors

    lights

    the lights used as an illumination source

    returns

    a Lambert shader

  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def phong(diffuse: ColorMap, specular: ColorMap, hardness: Float = 20.0f, lights: Vector[Light]): (Vector3, Vector3, Vector2, Projection) ⇒ Color

    Creates a shiny (Phong) shader with the specified surface map and the specified light.

    Creates a shiny (Phong) shader with the specified surface map and the specified light.

    For best results, scale down the diffuse and specular maps so they add up to about 1.0; a ratio of 0.8 diffuse--0.2 specular is a good starting point.

    diffuse

    the surface map sampled for diffuse colors

    specular

    the surface map sampled for specular colors

    hardness

    the hardness of the specular reflection (the Phong cosine power)

    lights

    the lights used as an illumination source

    returns

    a Phong shader

  21. def solid(c: Color): (Vector3, Vector3, Vector2, Projection) ⇒ Color

    A solid color shader.

    A solid color shader.

    c

    the color

    returns

    a shader

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. def toonLambert(m: ColorMap, e: ColorMap, levels: Int = 3, contour: Float = 0.5f, smoothness: Float = 0.1f, lights: Vector[Light]): (Vector3, Vector3, Vector2, Projection) ⇒ Color

    Creates a toon/cel shader, using Lambertian reflectance only, with the specified surface map and the specified light.

    Creates a toon/cel shader, using Lambertian reflectance only, with the specified surface map and the specified light.

    Note: this shader guesses edges by comparing the surface normal with the vector from the camera; this causes surfaces nearly perpendicular to the camera to appear completely black (as edges).

    m

    the surface map sampled for non-edge colors

    e

    the surface map sampled for edge colors

    levels

    the number of levels of shading

    contour

    a factor that is proportional to the edge contour thickness; 0.0 = no contour, 1.0 = thickest contour

    smoothness

    a factor that controls how smooth the smoothness between the surface and contours; 0.0 = no smoothing, 1.0 = smoothed across entire surface

    lights

    the lights used as an illumination source

    returns

    a toon shader

  25. def toonPhong(diffuse: ColorMap, specular: ColorMap, e: ColorMap, hardness: Float = 20.0f, levels: Int = 3, contour: Float = 0.5f, smoothness: Float = 0.1f, lights: Vector[Light]): (Vector3, Vector3, Vector2, Projection) ⇒ Color

    Creates a toon/cel shader, using Lambertian reflectance only, with the specified surface map and the specified light.

    Creates a toon/cel shader, using Lambertian reflectance only, with the specified surface map and the specified light.

    Note: this shader guesses edges by comparing the surface normal with the vector from the camera; this causes surfaces nearly perpendicular to the camera to appear completely black (as edges).

    diffuse

    the surface map sampled for non-edge colors

    specular

    the surface map sampled for specular colors

    e

    the surface map sampled for edge colors

    hardness

    the size of the specular reflection (the Phong cosine power)

    levels

    the number of levels of shading

    contour

    a factor that is proportional to the edge contour thickness; 0.0 = no contour, 1.0 = thickest contour

    smoothness

    a factor that controls how smooth the smoothness between the surface and contours or highlights; 0.0 = no smoothing, 1.0 = smoothed across entire surface

    lights

    the lights used as an illumination source

    returns

    a toon shader

  26. def uvTest: (Vector3, Vector3, Vector2, Projection) ⇒ Color

    A shader for testing UV coordinates.

    A shader for testing UV coordinates. U = 0 is the least saturated; U = 1 is the most saturated (sky blue color). V = 0 is the darkest; V = 1 is the lightest.

    returns

    a UV test shader

  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped