Unity3d envmap shaders

Source: Internet
Author: User

 

  1. Properties {
  2. _ Envmap ("envmap", 2d) = "black" {texgen spheremap}
  3. }
  4. Subshader {
  5. Pass {
  6. Name "base"
  7. Bindchannels {
  8. Bind "vertex", Vertex
  9. Bind "normal", normal
  10. }
  11. Settexture [_ envmap] {
  12. Combine texture
  13. }
  14. }
  15. }
  16. Fallback off
  17. }

Shader "My/envmap" {</P> <p> properties {<br/> _ envmap ("envmap", 2d) = "black" {texgen spheremap} <br/>}</P> <p> subshader {<br/> pass {<br/> name "base" <br/> bindchannels {<br/> bind "vertex ", vertex <br/> bind "normal ", normal <br/>}< br/> settexture [_ envmap] {<br/> combine texture <br/>}</P> <p> fallback off <br/>} 

[JavaScript]
View plaincopyprint?
  1. Shader "My/envmapglass"
  2. {
  3. Properties
  4. {
  5. _ Envmap ("envmap", 2d) = "black" {texgen spheremap}
  6. }
  7. Subshader
  8. {
  9. Seperatespecular on
  10. Pass
  11. {
  12. Name "base"
  13. Cull front
  14. Blend one oneminusdstcolor
  15. // Blend one
  16. Bindchannels
  17. {
  18. Bind "vertex", Vertex
  19. Bind "normal", normal
  20. }
  21. Settexture [_ envmap]
  22. {
  23. Combine texture
  24. }
  25. }
  26. Pass
  27. {
  28. Name "base"
  29. Zwrite on
  30. Blend one
  31. Bindchannels
  32. {
  33. Bind "vertex", Vertex
  34. Bind "normal", normal
  35. }
  36. Settexture [_ envmap]
  37. {
  38. Combine texture
  39. }
  40. }
  41. }
  42. Fallback off
  43. }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.