This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/StandardCurved" { | |
Properties { | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 | |
_Curvature ("Curvature", Range(0, 0.1)) = 0.01 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/Tessellation cg" | |
{ | |
Properties | |
{ | |
_ColorMap ("Color Map", 2D) = "black" {} | |
_TessellationFactor ("Tessellation Factor", Range(0, 64)) = 16 | |
} | |
SubShader | |
{ | |
Tags {"RenderType"="Opaque"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/Phong Tessellation Deferred" | |
{ | |
Properties { | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
[NoScaleOffset][Normal] _NormalTex ("Normal (RGB)", 2D) = "bump" {} | |
_NormalFactor ("Normal Strength", Range(0, 2)) = 1 | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://graphicrants.blogspot.com/2009/04/rgbm-color-encoding.html | |
float4 RGBMEncode( float3 color ) { | |
float4 rgbm; | |
color *= 1.0 / 6.0; | |
rgbm.a = saturate( max( max( color.r, color.g ), max( color.b, 1e-6 ) ) ); | |
rgbm.a = ceil( rgbm.a * 255.0 ) / 255.0; | |
rgbm.rgb = color / rgbm.a; | |
return rgbm; | |
} |