التخطي إلى المحتوى الرئيسي

المشاركات

عرض المشاركات من نوفمبر, 2013

High end realistic polish in your game?

Wondering how to achieve that high end realistic polish in your game? You should really check out physically-based surface shaders! Learn all about a ridiculously cool new framework by RUST LTD on our blog!  http://blogs.unity3d.com/?p=13775 Post by Unity3DIY .

[Shader] Transparent single color shader

This shader can give the object a solid color. And the alpha value can be adjusted by adjusting transparency. In Unity4.0 test without any problems. . . Shader "Custom / TransparentSingleColorShader" {  Properties {  _Color ("Color", Color) = (1.0, 1.0, 1.0, 1.0)  }  SubShader {  Tags {"RenderType" = "Transparent" "Queue" = "Transparent"}  Blend SrcAlpha OneMinusSrcAlpha  cull Off  LOD 200 CGPROGRAM  # pragma Surface Surf Lambert fixed4 _Color; / / Note: pointless Texture coordinate. I Could not GET Unity (or Cg)  / / to accept an empty or omit the Inputs Input Structure.  struct Input {  float2 uv_MainTex;  }; void Surf (Input IN, inout SurfaceOutput O) {  o.Albedo = _Color.rgb;  o.Emission = _Color.rgb; / / * _Color.a;  o.Alpha = _Color.a;  }  ENDCG  }  FallBack "Diffuse"  }