Advertisement
Frank84

Transparent/LightmappedDiffuse

Mar 13th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. Shader "Transparent/LightmappedDiffuse" {
  2. Properties {
  3. _Color ("Main Color", Color) = (1,1,1,1)
  4. _MainTex ("Base (RGB)", 2D) = "white" {}
  5. _LightMap ("Lightmap (RGB)", 2D) = "black" {}
  6. }
  7.  
  8. SubShader {
  9. LOD 200
  10. Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
  11.  
  12. CGPROGRAM
  13. #pragma surface surf Lambert alpha
  14. struct Input {
  15. float2 uv_MainTex;
  16. float2 uv2_LightMap;
  17. };
  18. sampler2D _MainTex;
  19. sampler2D _LightMap;
  20. fixed4 _Color;
  21. void surf (Input IN, inout SurfaceOutput o)
  22. {
  23. fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
  24. o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb * _Color;
  25. half4 lm = tex2D (_LightMap, IN.uv2_LightMap);
  26. o.Emission = lm.rgb*o.Albedo.rgb;
  27. o.Alpha = c.a;
  28. }
  29. ENDCG
  30. }
  31. FallBack "Transparent/Diffuse"
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement