Texture 纹理

作者:追风剑情 发布于:2016-4-19 16:41 分类:Shader

  1. Shader "Example/Diffuse Texture" {
  2. Properties {
  3. _MainTex ("Texture", 2D) = "white" {}
  4. }
  5. SubShader {
  6. Tags { "RenderType" = "Opaque" }
  7. CGPROGRAM
  8. #pragma surface surf Lambert
  9. struct Input {
  10. float2 uv_MainTex;
  11. };
  12. sampler2D _MainTex;
  13. void surf (Input IN, inout SurfaceOutput o) {
  14. o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
  15. }
  16. ENDCG
  17. }
  18. Fallback "Diffuse"
  19. }

效果

1111111111111.png

 

标签: Shader

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号