Vuo  1.2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
VuoShaderShaders.h File Reference

Description

VuoShader shader definitions.

Functions

static VuoShader VuoShader_makeDefaultShaderInternal (void)
 Helper for VuoShader_makeDefaultShader.
 
VuoShader VuoShader_makeDefaultShader (void)
 Returns a shared instance of the default (unlit checkerboard) shader.
 
VuoShader VuoShader_makeUnlitImageShader (VuoImage image, VuoReal alpha)
 Returns a shader that renders objects with an image (ignoring lighting).
 
VuoShader VuoShader_makeUnlitAlphaPassthruImageShader (VuoImage image, bool flipped)
 Returns a shader that renders objects with an image (ignoring lighting).
 
VuoShader VuoShader_makeGlTextureRectangleShader (VuoImage image, VuoReal alpha)
 Returns a shader that renders objects with an image (ignoring lighting).
 
VuoShader VuoShader_makeGlTextureRectangleAlphaPassthruShader (VuoImage image, bool flipped)
 Returns a shader that renders objects with an image (ignoring lighting).
 
VuoShader VuoShader_makeUnlitColorShader (VuoColor color)
 Returns a shader that renders a solid color.
 
VuoShader VuoShader_makeUnlitCircleShader (VuoColor color, VuoReal sharpness)
 Returns a shader that renders a solid color circle.
 
VuoShader VuoShader_makeUnlitRoundedRectangleShader (VuoColor color, VuoReal sharpness, VuoReal roundness, VuoReal aspect)
 Returns a shader that renders a solid color rounded rectangle.
 
VuoShader VuoShader_makeLitColorShader (VuoColor diffuseColor, VuoColor highlightColor, VuoReal shininess)
 Returns a shader that renders a color with lighting.
 
VuoShader VuoShader_makeLitImageShader (VuoImage image, VuoReal alpha, VuoColor highlightColor, VuoReal shininess)
 Returns a shader that renders an image with lighting.
 
VuoShader VuoShader_makeLitImageDetailsShader (VuoImage image, VuoReal alpha, VuoImage specularImage, VuoImage normalImage)
 Returns a shader that renders an image with lighting and surface details.
 
VuoShader VuoShader_makeLinearGradientShader (void)
 Returns a linear gradient shader.
 
static void VuoShader_setGradientStrip (VuoShader shader, VuoList_VuoColor colors)
 Creates a gradient strip texture, and sets shader uniforms.
 
void VuoShader_setLinearGradientShaderValues (VuoShader shader, VuoList_VuoColor colors, VuoPoint2d start, VuoPoint2d end, VuoReal noiseAmount)
 Sets parameters for the linear gradient shader using the provided colors and start and end coordinates.
 
VuoShader VuoShader_makeRadialGradientShader (void)
 Returns a radial gradient shader.
 
void VuoShader_setRadialGradientShaderValues (VuoShader shader, VuoList_VuoColor colors, VuoPoint2d center, VuoReal radius, VuoReal width, VuoReal height, VuoReal noiseAmount)
 Sets parameters for the radial gradient shader using the provided colors, center point, and radius.
 
VuoShader VuoShader_makeFrostedGlassShader (void)
 Returns a frosted glass shader.
 
void VuoShader_setFrostedGlassShaderValues (VuoShader shader, VuoColor color, VuoReal brightness, VuoReal noiseTime, VuoReal noiseAmount, VuoReal noiseScale, VuoReal chromaticAberration, VuoInteger levels, VuoReal roughness, VuoReal spacing, VuoInteger iterations)
 Sets parameters for the frosted glass shader.
 

Variables

static const char * defaultVertexShaderSourceForGeometryShader
 Projects position, and provides an unprojected position, used for triangulation.
 
static const char * lightingVertexShaderSource
 A linear-projection vertex shader.
 
static const char * lightingVertexShaderSourceForGeometry
 A linear-projection vertex shader.
 

Function Documentation

static VuoShader VuoShader_makeDefaultShaderInternal ( void  )
static
static void VuoShader_setGradientStrip ( VuoShader  shader,
VuoList_VuoColor  colors 
)
static

Creates a gradient strip texture, and sets shader uniforms.

Variable Documentation

const char* defaultVertexShaderSourceForGeometryShader
static
Initial value:
include(VuoGlslProjection)
uniform mat4 modelviewMatrix;
attribute vec4 position;
attribute vec4 textureCoordinate;
varying vec4 positionForGeometry;
varying vec4 textureCoordinateForGeometry;
void main()
{
positionForGeometry = cameraMatrixInverse * modelviewMatrix * position;
textureCoordinateForGeometry = textureCoordinate;
gl_Position = VuoGlsl_projectPosition(modelviewMatrix * position);
}
)

Projects position, and provides an unprojected position, used for triangulation.

const char* lightingVertexShaderSource
static
Initial value:
include(VuoGlslProjection)
uniform mat4 modelviewMatrix;
attribute vec4 position;
attribute vec4 normal;
attribute vec4 tangent;
attribute vec4 bitangent;
attribute vec4 textureCoordinate;
varying vec4 vertexPosition;
varying vec4 fragmentTextureCoordinate;
varying mat3 vertexPlaneToWorld;
void main()
{
vertexPosition = modelviewMatrix * position;
fragmentTextureCoordinate = textureCoordinate;
vertexPlaneToWorld[0] = normalize(vec3(modelviewMatrix * vec4(tangent.xyz,0.)));
vertexPlaneToWorld[1] = normalize(vec3(modelviewMatrix * -vec4(bitangent.xyz,0.)));
vertexPlaneToWorld[2] = normalize(vec3(modelviewMatrix * vec4(normal.xyz,0.)));
gl_Position = VuoGlsl_projectPosition(vertexPosition);
}
)

A linear-projection vertex shader.

Also builds a matrix that transforms between world coordinates and coordinates on a plane tangent to the surface.

const char* lightingVertexShaderSourceForGeometry
static
Initial value:
include(VuoGlslProjection)
uniform mat4 modelviewMatrix;
attribute vec4 position;
attribute vec4 normal;
attribute vec4 tangent;
attribute vec4 bitangent;
attribute vec4 textureCoordinate;
varying vec4 positionForGeometry;
varying vec4 textureCoordinateForGeometry;
void main()
{
positionForGeometry = modelviewMatrix * position;
textureCoordinateForGeometry = textureCoordinate;
gl_Position = VuoGlsl_projectPosition(positionForGeometry);
}
)

A linear-projection vertex shader.

Also builds a matrix that transforms between world coordinates and coordinates on a plane tangent to the surface.