Namespace: GLSL

SQR.GLSL

The global namespace holding GLSL code of all built-in shaders and shader chunks.

Source:

Members

(static) diffspec

A general purpose diffuse-specular shader.

It is used internally by the Unity scene parses as the default shader. It works with several light related uniforms, but for now only one light per shader is supported as well it can only be a directiona light.

This shader is meant to make working with basic shading easier, but is not intended to be some sort of one-shader-to-rule-them-all, so in most scenarios a custom GLSL shader might be required.

Shader source

Properties:
Name Type Description
diffspec
Source:

(static) normal2color

A simple debug shader

The direction of the normal is translated into the color for each pixel. Simple and useful for debugging.

Shader source

Properties:
Name Type Description
normal2color
Source:

(static) standardLight

A collection of light related functions

Includes diffuse(), specular() and brightness()

Shader source

Properties:
Name Type Description
standardLight
Source:

(static) texture

A simple textured shader

The shader accepts a single texture and UV channel to map it to.

Shader source

Properties:
Name Type Description
texture
Source: