duck

Unity 3D shader example blending between two textures

Jul 27th, 2012
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. Shader "BlendBetweenTwo" {
  2.  
  3. Properties {
  4. _Blend ("Blend", Range (0, 1) ) = 0.5
  5. _MainTex ("Texture 1", 2D) = ""
  6. _Texture2 ("Texture 2", 2D) = ""
  7. }
  8.  
  9. SubShader {
  10. Pass {
  11. SetTexture[_MainTex]
  12. SetTexture[_Texture2] {
  13. ConstantColor (0,0,0, [_Blend])
  14. Combine texture Lerp(constant) previous
  15. }
  16. }
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment