Vuo  2.0.2
Functions | Variables
VuoShaderShaders.h File Reference

Description

VuoShader shader definitions.

Definition in file VuoShaderShaders.h.

Go to the source code of this file.

Functions

static VuoShader VuoShader_makeDefaultShaderInternal (void)
 Helper for VuoShader_makeDefaultShader. More...
 
VuoShader VuoShader_makeDefaultShader (void)
 Returns a shared instance of the default (unlit checkerboard) shader. More...
 
VuoShader VuoShader_makeUnlitImageShader (VuoImage image, VuoReal alpha)
 Returns a shader that renders objects with an image (ignoring lighting). More...
 
VuoShader VuoShader_makeUnlitAlphaPassthruImageShader (VuoImage image, bool flipped)
 Returns a shader that renders objects with an image (ignoring lighting). More...
 
VuoShader VuoShader_makeGlTextureRectangleShader (VuoImage image, VuoReal alpha)
 Returns a shader that renders objects with an image (ignoring lighting). More...
 
VuoShader VuoShader_makeGlTextureRectangleAlphaPassthruShader (VuoImage image, bool flipped)
 Returns a shader that renders objects with an image (ignoring lighting). More...
 
VuoShader VuoShader_makeUnlitColorShader (VuoColor color)
 Returns a shader that renders a solid color. More...
 
VuoShader VuoShader_makeUnlitCircleShader (VuoColor color, VuoReal sharpness)
 Returns a shader that renders a solid color circle. More...
 
VuoShader VuoShader_makeUnlitCheckmarkShader (VuoColor color, VuoColor outline, float thickness)
 Returns a shader that renders a solid color checkmark with outline and outline thickness. More...
 
VuoShader VuoShader_makeUnlitRoundedRectangleShader (VuoColor color, VuoReal sharpness, VuoReal roundness, VuoReal aspect)
 Returns a shader that renders a solid color rounded rectangle. More...
 
VuoShader VuoShader_makeUnlitRoundedRectangleTrackShader (VuoColor backgroundColor, VuoColor activeColor, VuoReal sharpness, VuoReal roundness, VuoReal aspect, VuoBoolean isHorizontal, VuoReal value)
 Returns a shader that renders a solid color rounded rectangle with a split color based on value. More...
 
VuoShader VuoShader_makeLitColorShader (VuoColor diffuseColor, VuoColor highlightColor, VuoReal shininess)
 Returns a shader that renders a color with lighting. More...
 
VuoShader VuoShader_makeLitImageShader (VuoImage image, VuoReal alpha, VuoColor highlightColor, VuoReal shininess)
 Returns a shader that renders an image with lighting. More...
 
VuoShader VuoShader_makeLitImageDetailsShader (VuoImage image, VuoReal alpha, VuoImage specularImage, VuoImage normalImage)
 Returns a shader that renders an image with lighting and surface details. More...
 
VuoShader VuoShader_makeLinearGradientShader (void)
 Returns a linear gradient shader. More...
 
static void VuoShader_setGradientStrip (VuoShader shader, VuoList_VuoColor colors)
 Creates a gradient strip texture, and sets shader uniforms. More...
 
void VuoShader_setLinearGradientShaderValues (VuoShader shader, VuoList_VuoColor colors, VuoPoint2d start, VuoPoint2d end, VuoReal aspect, VuoReal noiseAmount)
 Sets parameters for the linear gradient shader using the provided colors and start and end coordinates. More...
 
VuoShader VuoShader_makeRadialGradientShader (void)
 Returns a radial gradient shader. More...
 
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. More...
 
VuoShader VuoShader_makeFrostedGlassShader (void)
 Returns a frosted glass shader. More...
 
void VuoShader_setFrostedGlassShaderValues (VuoShader shader, VuoColor color, VuoReal brightness, VuoPoint2d noisePosition, VuoReal noiseTime, VuoReal noiseAmount, VuoReal noiseScale, VuoReal chromaticAberration, VuoInteger levels, VuoReal roughness, VuoReal spacing, VuoInteger iterations, float aspectRatio)
 Sets parameters for the frosted glass shader. More...
 

Variables

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

Function Documentation

◆ VuoShader_makeDefaultShaderInternal()

static VuoShader VuoShader_makeDefaultShaderInternal ( void  )
static

Helper for VuoShader_makeDefaultShader.

Definition at line 43 of file VuoShaderShaders.h.

◆ VuoShader_setGradientStrip()

static void VuoShader_setGradientStrip ( VuoShader  shader,
VuoList_VuoColor  colors 
)
static

Creates a gradient strip texture, and sets shader uniforms.

Definition at line 1251 of file VuoShaderShaders.h.

Variable Documentation

◆ defaultVertexShaderSourceForGeometryShader

const char* defaultVertexShaderSourceForGeometryShader
static
Initial value:
\n#include "VuoGlslProjection.glsl"
uniform mat4 modelviewMatrix;
attribute vec3 position;
attribute vec3 normal;
attribute vec2 textureCoordinate;
attribute vec4 vertexColor;
uniform bool hasVertexColors;
varying vec3 geometryPosition;
varying vec3 geometryNormal;
varying vec2 geometryTextureCoordinate;
varying vec4 geometryVertexColor;
void main()
{
geometryPosition = (cameraMatrixInverse * modelviewMatrix * vec4(position, 1.)).xyz;
geometryNormal = (cameraMatrixInverse * modelviewMatrix * vec4(normal, 0.)).xyz;
geometryTextureCoordinate = textureCoordinate;
geometryVertexColor = hasVertexColors ? vertexColor : vec4(1.);
gl_Position = VuoGlsl_projectPosition(modelviewMatrix * vec4(position, 1.));
}
)

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

Definition at line 13 of file VuoShaderShaders.h.

◆ lightingVertexShaderSource

const char* lightingVertexShaderSource
static
Initial value:
\n#include "VuoGlslProjection.glsl"
uniform mat4 modelviewMatrix;
attribute vec3 position;
attribute vec3 normal;
attribute vec2 textureCoordinate;
attribute vec4 vertexColor;
uniform bool hasVertexColors;
varying vec3 fragmentPosition;
varying vec3 fragmentNormal;
varying vec2 fragmentTextureCoordinate;
varying vec4 fragmentVertexColor;
void main()
{
fragmentPosition = (modelviewMatrix * vec4(position, 1.)).xyz;
fragmentNormal = normalize(vec3(modelviewMatrix * vec4(normal, 0.)));
fragmentTextureCoordinate = textureCoordinate;
fragmentVertexColor = hasVertexColors ? vertexColor : vec4(1.);
gl_Position = VuoGlsl_projectPosition(fragmentPosition);
}
)

A linear-projection vertex shader.

Definition at line 908 of file VuoShaderShaders.h.

◆ lightingVertexShaderSourceForGeometry

const char* lightingVertexShaderSourceForGeometry
static
Initial value:
\n#include "VuoGlslProjection.glsl"
uniform mat4 modelviewMatrix;
attribute vec3 position;
attribute vec3 normal;
attribute vec2 textureCoordinate;
attribute vec4 vertexColor;
uniform bool hasVertexColors;
varying vec3 geometryPosition;
varying vec3 geometryNormal;
varying vec2 geometryTextureCoordinate;
varying vec4 geometryVertexColor;
void main()
{
geometryPosition = (modelviewMatrix * vec4(position, 1.)).xyz;
geometryNormal = normalize((modelviewMatrix * vec4(normal, 0.)).xyz);
geometryTextureCoordinate = textureCoordinate;
geometryVertexColor = hasVertexColors ? vertexColor : vec4(1.);
gl_Position = VuoGlsl_projectPosition(geometryPosition);
}
)

A linear-projection vertex shader.

Definition at line 938 of file VuoShaderShaders.h.