Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. Shader "Custom/Window Shader"
  2. {
  3. Properties
  4. {
  5. _MainColor ("Color", Color) = (1,1,1,1)
  6. _MainTex ("Diffuse", 2D) = "white" {}
  7. _RefTex ("Reflection", 2D) = "white" { TexGen SphereMap }
  8. }
  9.  
  10. SubShader
  11. {
  12. Tags { "RenderType"="Transparent" "Queue"="Transparent"}
  13. Pass
  14. {
  15. Lighting off
  16. Blend SrcAlpha OneMinusSrcAlpha
  17.  
  18. SetTexture[_MainTex]
  19. {
  20. constantColor[_MainColor]
  21. combine constant, one - texture
  22. }
  23.  
  24. SetTexture[_RefTex] { combine texture * previous alpha }
  25.  
  26. SetTexture[_RefTex]
  27. {
  28. constantColor[_MainColor]
  29. combine previous * constant
  30. }
  31.  
  32. SetTexture[_MainTex]
  33. {
  34. constantColor[_MainColor]
  35. combine previous + texture, texture * constant
  36. }
  37.  
  38. }
  39. }
  40. FallBack "Diffuse"
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement