Skip to content

Instantly share code, notes, and snippets.

@ditrytus
Created July 14, 2019 19:32
Show Gist options
  • Select an option

  • Save ditrytus/e3b1e9f14009a2f01dcb9284decd133c to your computer and use it in GitHub Desktop.

Select an option

Save ditrytus/e3b1e9f14009a2f01dcb9284decd133c to your computer and use it in GitHub Desktop.
All output structures of surface shader.
struct SurfaceOutput
{
fixed3 Albedo; // diffuse color
fixed3 Normal; // tangent space normal, if written
fixed3 Emission;
half Specular; // specular power in 0..1 range
fixed Gloss; // specular intensity
fixed Alpha; // alpha for transparencies
};
struct SurfaceOutputStandard
{
fixed3 Albedo; // base (diffuse or specular) color
fixed3 Normal; // tangent space normal, if written
half3 Emission;
half Metallic; // 0=non-metal, 1=metal
half Smoothness; // 0=rough, 1=smooth
half Occlusion; // occlusion (default 1)
fixed Alpha; // alpha for transparencies
};
struct SurfaceOutputStandardSpecular
{
fixed3 Albedo; // diffuse color
fixed3 Specular; // specular color
fixed3 Normal; // tangent space normal, if written
half3 Emission;
half Smoothness; // 0=rough, 1=smooth
half Occlusion; // occlusion (default 1)
fixed Alpha; // alpha for transparencies
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment