Skip to content

Instantly share code, notes, and snippets.

@metaleap
Created August 14, 2013 14:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save metaleap/6231511 to your computer and use it in GitHub Desktop.
Shader "Time of Day/Space"
{
// Properties
// {
// _MainTex ("Base (RGB)", 2D) = "white" {}
// }
SubShader
{
Tags
{
"Queue"="Transparent-450"
"RenderType"="Transparent"
"IgnoreProjector"="True"
}
Fog
{
Mode Off
}
Pass
{
Cull Front
ZWrite Off
ZTest LEqual
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
// sampler2D _MainTex;
struct v2f {
float4 position : POSITION;
// float2 starUV : TEXCOORD0;
};
v2f vert(appdata_base v) {
v2f o;
// float3 vertnorm = normalize(v.vertex.xyz);
o.position = mul(UNITY_MATRIX_MVP, v.vertex);
// o.starUV = MultiplyUV(UNITY_MATRIX_TEXTURE0, float2(vertnorm.z, vertnorm.x) / max(0.05, vertnorm.y));
return o;
}
fixed4 frag(v2f i) : COLOR {
return 1; // i.position * 0; //tex2D(_MainTex, i.starUV.xy);
}
ENDCG
}
}
FallBack "None"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment