Vuo  1.2.0
 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 (VuoList_VuoColor colors, VuoPoint2d start, VuoPoint2d end, VuoReal noiseAmount)
 Returns a shader that renders a linear gradient using the provided colors and start and end coordinates.
 
VuoShader VuoShader_makeRadialGradientShader (VuoList_VuoColor colors, VuoPoint2d center, VuoReal radius, VuoReal width, VuoReal height, VuoReal noiseAmount)
 Returns a shader that renders a radial gradient 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 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

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.