<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.unity3d.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.unity3d.com/api.php?action=feedcontributions&amp;user=Sahilramani&amp;feedformat=atom</id>
		<title>Unify Community Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.unity3d.com/api.php?action=feedcontributions&amp;user=Sahilramani&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://wiki.unity3d.com/index.php/Special:Contributions/Sahilramani"/>
		<updated>2013-05-23T17:29:50Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.1</generator>

	<entry>
		<id>http://wiki.unity3d.com/index.php/Shaders</id>
		<title>Shaders</title>
		<link rel="alternate" type="text/html" href="http://wiki.unity3d.com/index.php/Shaders"/>
				<updated>2012-02-17T19:29:50Z</updated>
		
		<summary type="html">&lt;p&gt;Sahilramani: /* Unity 3.x Shaders */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Guidelines ==&lt;br /&gt;
Please include a sample image or two showing off your shader goodness. If unsure how to do this, you can view a good example on the [[SkinShader2]] page, as a reference.&lt;br /&gt;
&lt;br /&gt;
== Official Shaders ==&lt;br /&gt;
&lt;br /&gt;
*[http://unity3d.com/support/resources/assets/built-in-shaders Built In Shaders] - Here you can get the sourcecode for all the shaders that are built into Unity.&lt;br /&gt;
&lt;br /&gt;
== Unity 3.x Shaders ==&lt;br /&gt;
&lt;br /&gt;
*[[Cg_Tutorial_to_Unity]] - Porting of Cg tutorial source code &lt;br /&gt;
*[[Cg_Shader_Patterns]] - Multiple Pixel Lights&lt;br /&gt;
*[[Vertex/Fragment Template]] - A basic template for writing your own vertex/fragment combination shader&lt;br /&gt;
*[[MatCap]] - A bumped shader without lighting, for use with materials from programs like ZBrush.&lt;br /&gt;
*[[Fur (Unity3)]] - A remake for Unity 3 support of a fur shader by Jonathan Czeck found in unity &lt;br /&gt;
*[[Skin Shader 3]] - The classic skin shader redone for Unity 3 by forum user bournifle&lt;br /&gt;
*[[Planet]] - A shader which adds an atmosphere and shading for one pointlight source to a planet.&lt;br /&gt;
*[[Dissolve With Texture]] - A simple shader which dissolves objects, using an image as guidance.&lt;br /&gt;
*[[TransparentShadowCaster]] - Can handle transparency and takes it into account for casting shadows.&lt;br /&gt;
*[[TransparentShadowReceiver]] - Can handle transparency and takes it into account for receiving shadows from both Spot/Point lights and Directional lights.&lt;br /&gt;
*[[TeamFortress2Shader]] - A toon ramped shader with vertical rim light, similar to the shading model found in Team Fortress 2.&lt;br /&gt;
*[[Anisotropic Highlight Shader]] - A shader that allows anistotropic highlights to be defined based on a directional texture. Good for brushed metal and hair.&lt;br /&gt;
*[[Outlined Diffuse 3]] - Toon outline on a normal diffuse shader, compatible with Unity 3.&lt;br /&gt;
*[[Silhouette-Outlined Diffuse]] - A variant of the [[Outlined Diffuse 3]] showing outlines only at the exteriors of the object.&lt;br /&gt;
*[[MirrorReflection3]] - Makes a direct, mirror like reflection. Updated version of [[MirrorReflection2]]&lt;br /&gt;
*[[Transparent Cutout Soft Edge Unlit Texture Blend]] Transparent Soft Edge Cutout Shader with blending between two textures given a blend factor. Useful for transitions.&lt;br /&gt;
&lt;br /&gt;
== Unity 2.x Shaders ==&lt;br /&gt;
&lt;br /&gt;
===Porting Shaders===&lt;br /&gt;
&lt;br /&gt;
*[[ShaderPortingNotes]] - Some guidelines for porting shaders between FX composer, RenderMonkey, Mental Mill, ShaderFX and Unity&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
*[[BarycentricWireframeUv1]] - A wireframe shader for barycentric uvs.&lt;br /&gt;
&lt;br /&gt;
*[[Delta]] - Visualize loss of detail caused by texture compression.&lt;br /&gt;
&lt;br /&gt;
*[[NormalSmoothing]] - Visualize normal smoothing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Fullscreen Effects (Unity Pro only) ===&lt;br /&gt;
*[[ColorBlindness]] - Coarse simulation of what your game might look like to someone who is red/green colorblind.&lt;br /&gt;
*[[DreamBlurEffect]] - Yet another bloom/glow style effect (Post Render Effect, requires Unity Pro)&lt;br /&gt;
*[[RefractionEffect]] - Fullscreen refraction effect. Can be used for raindrops, blood, underwater effects and others. Including color and color mask.&lt;br /&gt;
&lt;br /&gt;
=== FX ===&lt;br /&gt;
*[[Anisotropic 2.x]] - Updated anisotropic lighting for version 2.x&lt;br /&gt;
*[[DepthMask]] - For cutting holes in objects without changing geometry.&lt;br /&gt;
*[[DesaturatedDarks2]] - Non-lit areas are desaturated; lights &amp;quot;saturate&amp;quot; the colors (updated for v2).&lt;br /&gt;
*[[FXHyperbolicStatic]] - Special effect for things like force fields.&lt;br /&gt;
*[[FXHyperbolicStaticParticle]] - Special effect for things like energy balls with particle systems.&lt;br /&gt;
*[[FXTrigField]] - Special effect for things like force fields.&lt;br /&gt;
*[[MirrorReflection2]] - A shader and script to make reflective mirrors.&lt;br /&gt;
*[[Shield]] - A shader and script to make Shields spheres around your units (works with other shapes too).&lt;br /&gt;
*[[TextureMask]] - A simple shader that will allow you to mask of parts of a texture.&lt;br /&gt;
*[[Unlit]] - A shader that doesn't use lighting, useful for dashboard and other 3D GUI components.&lt;br /&gt;
*[[Binary]] - Limits down textured models to 2 individual colors.&lt;br /&gt;
*[[ProjectorAdditive]] - A shader for the projector component that does an additive/screen effect as opposed to multiply.&lt;br /&gt;
*[[XRay]] - Additive X-Ray shader.&lt;br /&gt;
*[[Planet]] - A shader which adds an atmosphere and per pixel lighting to your planets.&lt;br /&gt;
*[[Fur]] - A basic fur shader with some minor(?) sorting problems.&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
*[[BakedVertexColorBumpSpec2]] - Lightmap in vertex colors, bumped specular.&lt;br /&gt;
*[[BumpSpecRim]] - Bumpmapped specular with fake rim light affected by bump map.&lt;br /&gt;
*[[BumpColorSpec]] - Bumpmapped specular with colored specular map.&lt;br /&gt;
*[[ReflectiveVertexlitSimple]] - Simplified Reflective VertexLit shader, with a slider to control amount instead of alpha channel.&lt;br /&gt;
*[[SkinShader2]] - Shadow-supporting wrapped-diffuse+ specular + bumped + rim + fresnel shader. Good for skin shading!&lt;br /&gt;
*[[3SideProjDiffuse]] - Per pixel shaded autotexturing. No need for an UV-Map!&lt;br /&gt;
*[[3SideProjDiffuse1.1]] - Added the option of selecting different textures for X, Y and Z coordinates.&lt;br /&gt;
*[[ReliefDiffuse]] - Bumpmapped reliefmapping shader.&lt;br /&gt;
*[[ReliefSpecular]] - Bumpmapped reliefmapping shader with specularity.&lt;br /&gt;
&lt;br /&gt;
=== Interface ===&lt;br /&gt;
*[[3DText]] - Use this instead of the default shader when creating 3D Text, so the text doesn't always appear on top of objects.&lt;br /&gt;
*[[TexturedFont]] - Use this shader in place of the built in Text Shader for multicolored fonts instead of solid colored ones.&lt;br /&gt;
&lt;br /&gt;
=== iPhone ===&lt;br /&gt;
&lt;br /&gt;
These shaders are targeted at the original iPhone and iPod touch.&lt;br /&gt;
&lt;br /&gt;
*[[Blend 2 Textures]] - Blends two textures based on a slider, with an option to use light from [[Simply Lit]]&lt;br /&gt;
*[[Blend 2 Textures by Lightmap Alpha]] - A lightmapped shader that blends two tiling textures based on a splatmap.&lt;br /&gt;
*[[Masked Tint]] - Selectively tint your models based on a mask; render multiple differently-colored objects with only one total draw call.&lt;br /&gt;
*[[Simply Lit]] - Uses ambient and diffuse vertex lighting to affect a single texture.&lt;br /&gt;
*[[Texture Only]] - Maps a 2D texture onto your model, in 3D!&lt;br /&gt;
*[[VertexColorUnlit]] - Two shaders for using with vertex-colored meshes; allows overbrightening&lt;br /&gt;
*[[iPhoneGems]] -Using the gem .unitypackage from the unity website will cause poor gem shading on the iphone, this is their code including an update to the sub-shader that makes nicer iphone gems.&lt;br /&gt;
&lt;br /&gt;
=== Terrain ===&lt;br /&gt;
*[[LayerShader]] - A terrain shader that mixes two tileable textures.&lt;br /&gt;
*[[TerrainTwoLayerBumped]] - A terrain shader that mixes two tileable textures, plus a bumpmap.&lt;br /&gt;
*[[TerrainFourLayerDiffuseFast]] - A terrain shader that mixes four tileable textures, and also works like the Diffuse Fast shader.&lt;br /&gt;
*[[TerrainFourLayer2Pass]] - A terrain shader that mixes four tileable textures; should work on all modern cards and has fog.&lt;br /&gt;
*[[FourSplatBlendWrapShader]] - A terrain shader that mixes and wraps 4 diffuse splats from a 4x4 texture sheet.&lt;br /&gt;
&lt;br /&gt;
=== Toon ===&lt;br /&gt;
*[[ToonShadowed]] - Variant of the Toon-Basic shader that receives shadows.&lt;br /&gt;
*[[OutlinedDiffuse]] - Variant of the Toon-Basic shader that uses diffuse shading for surfaces&lt;br /&gt;
&lt;br /&gt;
=== Transparent ===&lt;br /&gt;
*[[AlphaClipsafe]] - Like Particles/Alpha Blended, but fades out before it intersects the camera's near clipping plane.&lt;br /&gt;
*[[AlphaSelfIllum]] - Textures object which is unaffected by light.&lt;br /&gt;
*[[AlphaVertexLitZ]] - Just like Transparent/VertexLit, but with proper depth buffering. Useful for objects that need to fade out.&lt;br /&gt;
*[[UnlitAlphaWithFade]] - Unlit shader similar to AlphaSelfIllum, but with the alpha of the colour taken into account to allow fading.&lt;br /&gt;
*[[AlphaDiffuse2sided]] - Transparent 2-sided rendering&lt;br /&gt;
&lt;br /&gt;
== Unity 1.x Shaders ==&lt;br /&gt;
&lt;br /&gt;
Most of these will just work with Unity 2.x, except mostly for complex pixel-lit shaders. If you verified that a shader from this list works with 2.x, add it to the list above as well!&lt;br /&gt;
&lt;br /&gt;
=== FX ===&lt;br /&gt;
*[[Refraction]] - A fake refraction shader.&lt;br /&gt;
*[[DepthMask]] - Masks areas with the depth buffer to cut holes in subsequent objects.&lt;br /&gt;
*[[DesaturatedDarks]] - Non-lit areas are desaturated; lights &amp;quot;saturate&amp;quot; the colors.&lt;br /&gt;
*[[MirrorReflection]] - A shader and script to make reflective mirrors.&lt;br /&gt;
*[[MirrorReflectionLightmapped]] - A shader and script to make reflective mirrors with a lightmap.&lt;br /&gt;
*[[ProjectorAdditive]] - A shader for the projector component that does an additive/screen effect as opposed to multiply.&lt;br /&gt;
*[[SkyboxBlended]] - A skybox that blends between two sets of skybox textures.&lt;br /&gt;
*[[Velvet]] - Velvet / Rim light shader&lt;br /&gt;
*[[XRay]] - Additive X-Ray shader.&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
*[[Anisotropic]] - A classical anisotropic lighting.&lt;br /&gt;
*[[BumpSpecModulate]] - Bump mapped shader that modulates between original texture color and &amp;quot;alpha color&amp;quot; based on alpha of main texture.&lt;br /&gt;
*[[Decal2UVs]] - Just like builtin Decal, just uses two UV sets.&lt;br /&gt;
*[[SimpleAdditive]] - Colors a object with a single additive color.&lt;br /&gt;
*[[SkinShader]] - A wrapped-diffuse plus specular plus rim righting shader. Good for skin shading!&lt;br /&gt;
*[[TextureAdditive]] - Colors a object with a additive texture.&lt;br /&gt;
*[[VertexColor]] - A vertex lit shader that takes per-vertex colors into account.&lt;br /&gt;
*[[VertexColorParallaxBump]] - Like the builtin Diffuse Parallax Bump, only takes vertex color into account as well.&lt;br /&gt;
=== Interface ===&lt;br /&gt;
*[[Reveal Non-Uniform Texture]] - A shader for revealing a texture using another texture. Useful for non-rectilinear loading / progress bars. &lt;br /&gt;
=== Lightmap ===&lt;br /&gt;
*[[BakedLightingDetailTexture]] - A main+detail texture shader with precomputed per-vertex lighting.&lt;br /&gt;
*[[BakedVertexColorLighting]] - Like lightmapping only the lighting is precomputed in the vertex colors&lt;br /&gt;
=== Terrain ===&lt;br /&gt;
*[[LayerShader]] - A terrain shader that mixes two tileable textures.&lt;br /&gt;
*[[TerrainFourLayer]] - A terrain shader that mixes four tileable textures.&lt;br /&gt;
*[[TerrainTwoLayerBumped]] - A terrain shader that mixes two tileable textures, plus a bumpmap.&lt;br /&gt;
*[[VegetationTwoPass]] - Great vegetation shader, renders opaque and then renders semitransparent.&lt;br /&gt;
*[[VegetationVertexLit]] - Vertex-lit shader with no culling that is ideal for vegetation and other two sided polygon models.&lt;br /&gt;
=== Transparent ===&lt;br /&gt;
*[[AlphaDiffuseZ]] - Same as Unity Alpha Diffuse but with different Z buffering. Useful for interior (reversed normal) scenes that have alpha objects.&lt;br /&gt;
*[[AlphaSelfIllum]] - Textures object which is unaffected by light.&lt;br /&gt;
*[[AlphaVertexColor]] - A transparent vertex lit shader that takes per-vertex colors into account.&lt;br /&gt;
*[[BlendedDecal]] - Suitable for superimposing alpha-masked textured markings onto the same plane as another surface.&lt;br /&gt;
*[[BlendedFlatColor]] - Colors a transparent object, good for HUD objects.&lt;br /&gt;
*[[UnlitAlpha]] - A non-backface culled, unilluminated, alpha tested shader which is suitable for sprites.&lt;br /&gt;
*[[WindowShader]] - Suitable for windows (the glass things in houses, not the darn Seattle company.)&lt;br /&gt;
*[[SeeObjectsBehindOthers]] - Good for if you always want to be able to see an object(3D HUD instead of GUI, or seeing a player behind a wall.)&lt;/div&gt;</summary>
		<author><name>Sahilramani</name></author>	</entry>

	<entry>
		<id>http://wiki.unity3d.com/index.php/Shaders</id>
		<title>Shaders</title>
		<link rel="alternate" type="text/html" href="http://wiki.unity3d.com/index.php/Shaders"/>
				<updated>2012-02-17T19:01:58Z</updated>
		
		<summary type="html">&lt;p&gt;Sahilramani: /* Unity 3.x Shaders */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Guidelines ==&lt;br /&gt;
Please include a sample image or two showing off your shader goodness. If unsure how to do this, you can view a good example on the [[SkinShader2]] page, as a reference.&lt;br /&gt;
&lt;br /&gt;
== Official Shaders ==&lt;br /&gt;
&lt;br /&gt;
*[http://unity3d.com/support/resources/assets/built-in-shaders Built In Shaders] - Here you can get the sourcecode for all the shaders that are built into Unity.&lt;br /&gt;
&lt;br /&gt;
== Unity 3.x Shaders ==&lt;br /&gt;
&lt;br /&gt;
*[[Cg_Tutorial_to_Unity]] - Porting of Cg tutorial source code &lt;br /&gt;
*[[Cg_Shader_Patterns]] - Multiple Pixel Lights&lt;br /&gt;
*[[Vertex/Fragment Template]] - A basic template for writing your own vertex/fragment combination shader&lt;br /&gt;
*[[MatCap]] - A bumped shader without lighting, for use with materials from programs like ZBrush.&lt;br /&gt;
*[[Fur (Unity3)]] - A remake for Unity 3 support of a fur shader by Jonathan Czeck found in unity &lt;br /&gt;
*[[Skin Shader 3]] - The classic skin shader redone for Unity 3 by forum user bournifle&lt;br /&gt;
*[[Planet]] - A shader which adds an atmosphere and shading for one pointlight source to a planet.&lt;br /&gt;
*[[Dissolve With Texture]] - A simple shader which dissolves objects, using an image as guidance.&lt;br /&gt;
*[[TransparentShadowCaster]] - Can handle transparency and takes it into account for casting shadows.&lt;br /&gt;
*[[TransparentShadowReceiver]] - Can handle transparency and takes it into account for receiving shadows from both Spot/Point lights and Directional lights.&lt;br /&gt;
*[[TeamFortress2Shader]] - A toon ramped shader with vertical rim light, similar to the shading model found in Team Fortress 2.&lt;br /&gt;
*[[Anisotropic Highlight Shader]] - A shader that allows anistotropic highlights to be defined based on a directional texture. Good for brushed metal and hair.&lt;br /&gt;
*[[Outlined Diffuse 3]] - Toon outline on a normal diffuse shader, compatible with Unity 3.&lt;br /&gt;
*[[Silhouette-Outlined Diffuse]] - A variant of the [[Outlined Diffuse 3]] showing outlines only at the exteriors of the object.&lt;br /&gt;
*[[MirrorReflection3]] - Makes a direct, mirror like reflection. Updated version of [[MirrorReflection2]]&lt;br /&gt;
*[[Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend]] Transparent Soft Edge Cutout Shader with blending between two textures given a blend factor. Useful for transitions.&lt;br /&gt;
&lt;br /&gt;
== Unity 2.x Shaders ==&lt;br /&gt;
&lt;br /&gt;
===Porting Shaders===&lt;br /&gt;
&lt;br /&gt;
*[[ShaderPortingNotes]] - Some guidelines for porting shaders between FX composer, RenderMonkey, Mental Mill, ShaderFX and Unity&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
*[[BarycentricWireframeUv1]] - A wireframe shader for barycentric uvs.&lt;br /&gt;
&lt;br /&gt;
*[[Delta]] - Visualize loss of detail caused by texture compression.&lt;br /&gt;
&lt;br /&gt;
*[[NormalSmoothing]] - Visualize normal smoothing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Fullscreen Effects (Unity Pro only) ===&lt;br /&gt;
*[[ColorBlindness]] - Coarse simulation of what your game might look like to someone who is red/green colorblind.&lt;br /&gt;
*[[DreamBlurEffect]] - Yet another bloom/glow style effect (Post Render Effect, requires Unity Pro)&lt;br /&gt;
*[[RefractionEffect]] - Fullscreen refraction effect. Can be used for raindrops, blood, underwater effects and others. Including color and color mask.&lt;br /&gt;
&lt;br /&gt;
=== FX ===&lt;br /&gt;
*[[Anisotropic 2.x]] - Updated anisotropic lighting for version 2.x&lt;br /&gt;
*[[DepthMask]] - For cutting holes in objects without changing geometry.&lt;br /&gt;
*[[DesaturatedDarks2]] - Non-lit areas are desaturated; lights &amp;quot;saturate&amp;quot; the colors (updated for v2).&lt;br /&gt;
*[[FXHyperbolicStatic]] - Special effect for things like force fields.&lt;br /&gt;
*[[FXHyperbolicStaticParticle]] - Special effect for things like energy balls with particle systems.&lt;br /&gt;
*[[FXTrigField]] - Special effect for things like force fields.&lt;br /&gt;
*[[MirrorReflection2]] - A shader and script to make reflective mirrors.&lt;br /&gt;
*[[Shield]] - A shader and script to make Shields spheres around your units (works with other shapes too).&lt;br /&gt;
*[[TextureMask]] - A simple shader that will allow you to mask of parts of a texture.&lt;br /&gt;
*[[Unlit]] - A shader that doesn't use lighting, useful for dashboard and other 3D GUI components.&lt;br /&gt;
*[[Binary]] - Limits down textured models to 2 individual colors.&lt;br /&gt;
*[[ProjectorAdditive]] - A shader for the projector component that does an additive/screen effect as opposed to multiply.&lt;br /&gt;
*[[XRay]] - Additive X-Ray shader.&lt;br /&gt;
*[[Planet]] - A shader which adds an atmosphere and per pixel lighting to your planets.&lt;br /&gt;
*[[Fur]] - A basic fur shader with some minor(?) sorting problems.&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
*[[BakedVertexColorBumpSpec2]] - Lightmap in vertex colors, bumped specular.&lt;br /&gt;
*[[BumpSpecRim]] - Bumpmapped specular with fake rim light affected by bump map.&lt;br /&gt;
*[[BumpColorSpec]] - Bumpmapped specular with colored specular map.&lt;br /&gt;
*[[ReflectiveVertexlitSimple]] - Simplified Reflective VertexLit shader, with a slider to control amount instead of alpha channel.&lt;br /&gt;
*[[SkinShader2]] - Shadow-supporting wrapped-diffuse+ specular + bumped + rim + fresnel shader. Good for skin shading!&lt;br /&gt;
*[[3SideProjDiffuse]] - Per pixel shaded autotexturing. No need for an UV-Map!&lt;br /&gt;
*[[3SideProjDiffuse1.1]] - Added the option of selecting different textures for X, Y and Z coordinates.&lt;br /&gt;
*[[ReliefDiffuse]] - Bumpmapped reliefmapping shader.&lt;br /&gt;
*[[ReliefSpecular]] - Bumpmapped reliefmapping shader with specularity.&lt;br /&gt;
&lt;br /&gt;
=== Interface ===&lt;br /&gt;
*[[3DText]] - Use this instead of the default shader when creating 3D Text, so the text doesn't always appear on top of objects.&lt;br /&gt;
*[[TexturedFont]] - Use this shader in place of the built in Text Shader for multicolored fonts instead of solid colored ones.&lt;br /&gt;
&lt;br /&gt;
=== iPhone ===&lt;br /&gt;
&lt;br /&gt;
These shaders are targeted at the original iPhone and iPod touch.&lt;br /&gt;
&lt;br /&gt;
*[[Blend 2 Textures]] - Blends two textures based on a slider, with an option to use light from [[Simply Lit]]&lt;br /&gt;
*[[Blend 2 Textures by Lightmap Alpha]] - A lightmapped shader that blends two tiling textures based on a splatmap.&lt;br /&gt;
*[[Masked Tint]] - Selectively tint your models based on a mask; render multiple differently-colored objects with only one total draw call.&lt;br /&gt;
*[[Simply Lit]] - Uses ambient and diffuse vertex lighting to affect a single texture.&lt;br /&gt;
*[[Texture Only]] - Maps a 2D texture onto your model, in 3D!&lt;br /&gt;
*[[VertexColorUnlit]] - Two shaders for using with vertex-colored meshes; allows overbrightening&lt;br /&gt;
*[[iPhoneGems]] -Using the gem .unitypackage from the unity website will cause poor gem shading on the iphone, this is their code including an update to the sub-shader that makes nicer iphone gems.&lt;br /&gt;
&lt;br /&gt;
=== Terrain ===&lt;br /&gt;
*[[LayerShader]] - A terrain shader that mixes two tileable textures.&lt;br /&gt;
*[[TerrainTwoLayerBumped]] - A terrain shader that mixes two tileable textures, plus a bumpmap.&lt;br /&gt;
*[[TerrainFourLayerDiffuseFast]] - A terrain shader that mixes four tileable textures, and also works like the Diffuse Fast shader.&lt;br /&gt;
*[[TerrainFourLayer2Pass]] - A terrain shader that mixes four tileable textures; should work on all modern cards and has fog.&lt;br /&gt;
*[[FourSplatBlendWrapShader]] - A terrain shader that mixes and wraps 4 diffuse splats from a 4x4 texture sheet.&lt;br /&gt;
&lt;br /&gt;
=== Toon ===&lt;br /&gt;
*[[ToonShadowed]] - Variant of the Toon-Basic shader that receives shadows.&lt;br /&gt;
*[[OutlinedDiffuse]] - Variant of the Toon-Basic shader that uses diffuse shading for surfaces&lt;br /&gt;
&lt;br /&gt;
=== Transparent ===&lt;br /&gt;
*[[AlphaClipsafe]] - Like Particles/Alpha Blended, but fades out before it intersects the camera's near clipping plane.&lt;br /&gt;
*[[AlphaSelfIllum]] - Textures object which is unaffected by light.&lt;br /&gt;
*[[AlphaVertexLitZ]] - Just like Transparent/VertexLit, but with proper depth buffering. Useful for objects that need to fade out.&lt;br /&gt;
*[[UnlitAlphaWithFade]] - Unlit shader similar to AlphaSelfIllum, but with the alpha of the colour taken into account to allow fading.&lt;br /&gt;
*[[AlphaDiffuse2sided]] - Transparent 2-sided rendering&lt;br /&gt;
&lt;br /&gt;
== Unity 1.x Shaders ==&lt;br /&gt;
&lt;br /&gt;
Most of these will just work with Unity 2.x, except mostly for complex pixel-lit shaders. If you verified that a shader from this list works with 2.x, add it to the list above as well!&lt;br /&gt;
&lt;br /&gt;
=== FX ===&lt;br /&gt;
*[[Refraction]] - A fake refraction shader.&lt;br /&gt;
*[[DepthMask]] - Masks areas with the depth buffer to cut holes in subsequent objects.&lt;br /&gt;
*[[DesaturatedDarks]] - Non-lit areas are desaturated; lights &amp;quot;saturate&amp;quot; the colors.&lt;br /&gt;
*[[MirrorReflection]] - A shader and script to make reflective mirrors.&lt;br /&gt;
*[[MirrorReflectionLightmapped]] - A shader and script to make reflective mirrors with a lightmap.&lt;br /&gt;
*[[ProjectorAdditive]] - A shader for the projector component that does an additive/screen effect as opposed to multiply.&lt;br /&gt;
*[[SkyboxBlended]] - A skybox that blends between two sets of skybox textures.&lt;br /&gt;
*[[Velvet]] - Velvet / Rim light shader&lt;br /&gt;
*[[XRay]] - Additive X-Ray shader.&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
*[[Anisotropic]] - A classical anisotropic lighting.&lt;br /&gt;
*[[BumpSpecModulate]] - Bump mapped shader that modulates between original texture color and &amp;quot;alpha color&amp;quot; based on alpha of main texture.&lt;br /&gt;
*[[Decal2UVs]] - Just like builtin Decal, just uses two UV sets.&lt;br /&gt;
*[[SimpleAdditive]] - Colors a object with a single additive color.&lt;br /&gt;
*[[SkinShader]] - A wrapped-diffuse plus specular plus rim righting shader. Good for skin shading!&lt;br /&gt;
*[[TextureAdditive]] - Colors a object with a additive texture.&lt;br /&gt;
*[[VertexColor]] - A vertex lit shader that takes per-vertex colors into account.&lt;br /&gt;
*[[VertexColorParallaxBump]] - Like the builtin Diffuse Parallax Bump, only takes vertex color into account as well.&lt;br /&gt;
=== Interface ===&lt;br /&gt;
*[[Reveal Non-Uniform Texture]] - A shader for revealing a texture using another texture. Useful for non-rectilinear loading / progress bars. &lt;br /&gt;
=== Lightmap ===&lt;br /&gt;
*[[BakedLightingDetailTexture]] - A main+detail texture shader with precomputed per-vertex lighting.&lt;br /&gt;
*[[BakedVertexColorLighting]] - Like lightmapping only the lighting is precomputed in the vertex colors&lt;br /&gt;
=== Terrain ===&lt;br /&gt;
*[[LayerShader]] - A terrain shader that mixes two tileable textures.&lt;br /&gt;
*[[TerrainFourLayer]] - A terrain shader that mixes four tileable textures.&lt;br /&gt;
*[[TerrainTwoLayerBumped]] - A terrain shader that mixes two tileable textures, plus a bumpmap.&lt;br /&gt;
*[[VegetationTwoPass]] - Great vegetation shader, renders opaque and then renders semitransparent.&lt;br /&gt;
*[[VegetationVertexLit]] - Vertex-lit shader with no culling that is ideal for vegetation and other two sided polygon models.&lt;br /&gt;
=== Transparent ===&lt;br /&gt;
*[[AlphaDiffuseZ]] - Same as Unity Alpha Diffuse but with different Z buffering. Useful for interior (reversed normal) scenes that have alpha objects.&lt;br /&gt;
*[[AlphaSelfIllum]] - Textures object which is unaffected by light.&lt;br /&gt;
*[[AlphaVertexColor]] - A transparent vertex lit shader that takes per-vertex colors into account.&lt;br /&gt;
*[[BlendedDecal]] - Suitable for superimposing alpha-masked textured markings onto the same plane as another surface.&lt;br /&gt;
*[[BlendedFlatColor]] - Colors a transparent object, good for HUD objects.&lt;br /&gt;
*[[UnlitAlpha]] - A non-backface culled, unilluminated, alpha tested shader which is suitable for sprites.&lt;br /&gt;
*[[WindowShader]] - Suitable for windows (the glass things in houses, not the darn Seattle company.)&lt;br /&gt;
*[[SeeObjectsBehindOthers]] - Good for if you always want to be able to see an object(3D HUD instead of GUI, or seeing a player behind a wall.)&lt;/div&gt;</summary>
		<author><name>Sahilramani</name></author>	</entry>

	<entry>
		<id>http://wiki.unity3d.com/index.php/File:Blend1.png</id>
		<title>File:Blend1.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.unity3d.com/index.php/File:Blend1.png"/>
				<updated>2012-02-17T18:59:50Z</updated>
		
		<summary type="html">&lt;p&gt;Sahilramani: Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend with _Blend=1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend]] with _Blend=1&lt;/div&gt;</summary>
		<author><name>Sahilramani</name></author>	</entry>

	<entry>
		<id>http://wiki.unity3d.com/index.php/File:Blend5.png</id>
		<title>File:Blend5.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.unity3d.com/index.php/File:Blend5.png"/>
				<updated>2012-02-17T18:59:34Z</updated>
		
		<summary type="html">&lt;p&gt;Sahilramani: Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend with _Blend=0.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend]] with _Blend=0.5&lt;/div&gt;</summary>
		<author><name>Sahilramani</name></author>	</entry>

	<entry>
		<id>http://wiki.unity3d.com/index.php/File:Blend0.png</id>
		<title>File:Blend0.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.unity3d.com/index.php/File:Blend0.png"/>
				<updated>2012-02-17T18:57:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sahilramani: Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend with _Blend=0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend]] with _Blend=0&lt;/div&gt;</summary>
		<author><name>Sahilramani</name></author>	</entry>

	<entry>
		<id>http://wiki.unity3d.com/index.php/Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend</id>
		<title>Transparent Cutout Soft Edge Unlit Texture Blend</title>
		<link rel="alternate" type="text/html" href="http://wiki.unity3d.com/index.php/Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend"/>
				<updated>2012-02-17T18:55:49Z</updated>
		
		<summary type="html">&lt;p&gt;Sahilramani: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
[[File:Blend0.png|thumb|_Blend=0]]&lt;br /&gt;
[[File:Blend5.png|thumb|_Blend=0.5]]&lt;br /&gt;
[[File:Blend1.png|thumb|_Blend=1]]&lt;br /&gt;
Modified Transparent/Cutout/SoftEdgeUnlit shader to include blending between two different textures given a blend factor.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
The &amp;quot;_Cutoff&amp;quot; variable specifies the base alpha cutoff, just as it does in the original shader.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;_Blend&amp;quot; variable specifies the blend factor, while &amp;quot;_Texture1&amp;quot; and &amp;quot;_Texture2&amp;quot; specify the two textures to be blended. &lt;br /&gt;
&lt;br /&gt;
Note that when _Blend=0, _Texture1 will be selected and when _Blend=1, _Texture2 will be selected.&lt;br /&gt;
&lt;br /&gt;
==More==&lt;br /&gt;
&lt;br /&gt;
[[Category: Unity 3.x shaders]]&lt;br /&gt;
[[Category: Cg shaders]]&lt;br /&gt;
[[Category: Transparent]]&lt;br /&gt;
[[Category: Unlit]]&lt;br /&gt;
[[Category: Blending]]&lt;br /&gt;
&lt;br /&gt;
NOTE: The original shader is part of the Unity default shaders. The credits for those belong to the respective authors. I have merely added the ability to blend between two textures.&lt;br /&gt;
&lt;br /&gt;
==Shader Files==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shaderlab&amp;quot;&amp;gt;&lt;br /&gt;
Shader &amp;quot;Custom/TransparentCutoutSoftEdgeBlendedUnlit&amp;quot; { &lt;br /&gt;
Properties {&lt;br /&gt;
	_Color (&amp;quot;Main Color&amp;quot;, Color) = (1, 1, 1, 1)&lt;br /&gt;
	_Cutoff (&amp;quot;Base Alpha cutoff&amp;quot;, Range (0,.9)) = .5&lt;br /&gt;
	_Blend (&amp;quot;Blend&amp;quot;, Range (0, 1) ) = 0.5 &lt;br /&gt;
	_Texture1 (&amp;quot;Texture 1&amp;quot;, 2D) = &amp;quot;&amp;quot; &lt;br /&gt;
        _Texture2 (&amp;quot;Texture 2&amp;quot;, 2D) = &amp;quot;&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
SubShader {&lt;br /&gt;
	Tags { &amp;quot;Queue&amp;quot;=&amp;quot;AlphaTest&amp;quot; &amp;quot;IgnoreProjector&amp;quot;=&amp;quot;True&amp;quot; &amp;quot;RenderType&amp;quot;=&amp;quot;TransparentCutout&amp;quot; }&lt;br /&gt;
	Lighting off&lt;br /&gt;
	&lt;br /&gt;
	// Render both front and back facing polygons.&lt;br /&gt;
	Cull Off&lt;br /&gt;
	&lt;br /&gt;
	// first pass:&lt;br /&gt;
	//   render any pixels that are more than [_Cutoff] opaque&lt;br /&gt;
	Pass {  &lt;br /&gt;
		CGPROGRAM&lt;br /&gt;
			#pragma vertex vert&lt;br /&gt;
			#pragma fragment frag&lt;br /&gt;
			&lt;br /&gt;
			#include &amp;quot;UnityCG.cginc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			struct appdata_t {&lt;br /&gt;
				float4 vertex : POSITION;&lt;br /&gt;
				float4 color : COLOR;&lt;br /&gt;
				float2 texcoord : TEXCOORD0;&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			struct v2f {&lt;br /&gt;
				float4 vertex : POSITION;&lt;br /&gt;
				float4 color : COLOR;&lt;br /&gt;
				float2 texcoord : TEXCOORD0;&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			sampler2D _Texture1;&lt;br /&gt;
			sampler2D _Texture2;&lt;br /&gt;
			float4 _Texture1_ST;&lt;br /&gt;
			float4 _Texture2_ST;&lt;br /&gt;
			float _Cutoff;&lt;br /&gt;
			float _Blend;&lt;br /&gt;
			&lt;br /&gt;
			v2f vert (appdata_t v)&lt;br /&gt;
			{&lt;br /&gt;
				v2f o;&lt;br /&gt;
				o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);&lt;br /&gt;
				o.color = v.color;&lt;br /&gt;
				o.texcoord = TRANSFORM_TEX(v.texcoord, _Texture1);&lt;br /&gt;
				return o;&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			float4 _Color;&lt;br /&gt;
			half4 frag (v2f i) : COLOR&lt;br /&gt;
			{&lt;br /&gt;
				half4 col = lerp(tex2D(_Texture1, i.texcoord),tex2D(_Texture2, i.texcoord), _Blend);&lt;br /&gt;
				clip(col.a - _Cutoff);&lt;br /&gt;
				return col;&lt;br /&gt;
			}&lt;br /&gt;
		ENDCG&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Second pass:&lt;br /&gt;
	//   render the semitransparent details.&lt;br /&gt;
	Pass {&lt;br /&gt;
		Tags { &amp;quot;RequireOption&amp;quot; = &amp;quot;SoftVegetation&amp;quot; }&lt;br /&gt;
		&lt;br /&gt;
		// Dont write to the depth buffer&lt;br /&gt;
		ZWrite off&lt;br /&gt;
		&lt;br /&gt;
		// Set up alpha blending&lt;br /&gt;
		Blend SrcAlpha OneMinusSrcAlpha&lt;br /&gt;
		&lt;br /&gt;
		CGPROGRAM&lt;br /&gt;
			#pragma vertex vert&lt;br /&gt;
			#pragma fragment frag&lt;br /&gt;
			&lt;br /&gt;
			#include &amp;quot;UnityCG.cginc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			struct appdata_t {&lt;br /&gt;
				float4 vertex : POSITION;&lt;br /&gt;
				float4 color : COLOR;&lt;br /&gt;
				float2 texcoord : TEXCOORD0;&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			struct v2f {&lt;br /&gt;
				float4 vertex : POSITION;&lt;br /&gt;
				float4 color : COLOR;&lt;br /&gt;
				float2 texcoord : TEXCOORD0;&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			sampler2D _Texture1;&lt;br /&gt;
			sampler2D _Texture2;&lt;br /&gt;
			float4 _Texture1_ST;&lt;br /&gt;
			float4 _Texture2_ST;&lt;br /&gt;
			float _Cutoff;&lt;br /&gt;
			float _Blend;&lt;br /&gt;
&lt;br /&gt;
			v2f vert (appdata_t v)&lt;br /&gt;
			{&lt;br /&gt;
				v2f o;&lt;br /&gt;
				o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);&lt;br /&gt;
				o.color = v.color;&lt;br /&gt;
				o.texcoord = TRANSFORM_TEX(v.texcoord, _Texture1);&lt;br /&gt;
				return o;&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			float4 _Color;&lt;br /&gt;
			half4 frag (v2f i) : COLOR&lt;br /&gt;
			{&lt;br /&gt;
				half4 col = lerp(tex2D(_Texture1, i.texcoord),tex2D(_Texture2, i.texcoord), _Blend);&lt;br /&gt;
				clip(-(col.a - _Cutoff));&lt;br /&gt;
				return col;&lt;br /&gt;
			}&lt;br /&gt;
		ENDCG&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
SubShader {&lt;br /&gt;
	Tags { &amp;quot;IgnoreProjector&amp;quot;=&amp;quot;True&amp;quot; &amp;quot;RenderType&amp;quot;=&amp;quot;TransparentCutout&amp;quot; }&lt;br /&gt;
	Lighting off&lt;br /&gt;
	&lt;br /&gt;
	// Render both front and back facing polygons.&lt;br /&gt;
	Cull Off&lt;br /&gt;
	&lt;br /&gt;
	// first pass:&lt;br /&gt;
	//   render any pixels that are more than [_Cutoff] opaque&lt;br /&gt;
	Pass {  &lt;br /&gt;
		AlphaTest Greater [_Cutoff]&lt;br /&gt;
		SetTexture [_Texture1] {&lt;br /&gt;
			constantColor [_Color]&lt;br /&gt;
			combine texture * constant, texture * constant &lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Second pass:&lt;br /&gt;
	//   render the semitransparent details.&lt;br /&gt;
	Pass {&lt;br /&gt;
		Tags { &amp;quot;RequireOption&amp;quot; = &amp;quot;SoftVegetation&amp;quot; }&lt;br /&gt;
		&lt;br /&gt;
		// Dont write to the depth buffer&lt;br /&gt;
		ZWrite off&lt;br /&gt;
		&lt;br /&gt;
		// Only render pixels less or equal to the value&lt;br /&gt;
		AlphaTest LEqual [_Cutoff]&lt;br /&gt;
		&lt;br /&gt;
		// Set up alpha blending&lt;br /&gt;
		Blend SrcAlpha OneMinusSrcAlpha&lt;br /&gt;
		&lt;br /&gt;
		SetTexture [_Texture1] {&lt;br /&gt;
			constantColor [_Color]&lt;br /&gt;
			Combine texture * constant, texture * constant &lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Sahilramani|Sahil Ramani]] 10:51, 17 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Sahilramani</name></author>	</entry>

	<entry>
		<id>http://wiki.unity3d.com/index.php/Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend</id>
		<title>Transparent Cutout Soft Edge Unlit Texture Blend</title>
		<link rel="alternate" type="text/html" href="http://wiki.unity3d.com/index.php/Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend"/>
				<updated>2012-02-17T18:51:41Z</updated>
		
		<summary type="html">&lt;p&gt;Sahilramani: Created page with &amp;quot;==Description== Modified Transparent/Cutout/SoftEdgeUnlit shader to include blending between two different textures given a blend factor.  ==Usage== The &amp;quot;_Cutoff&amp;quot; variable spe...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Modified Transparent/Cutout/SoftEdgeUnlit shader to include blending between two different textures given a blend factor.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
The &amp;quot;_Cutoff&amp;quot; variable specifies the base alpha cutoff, just as it does in the original shader.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;_Blend&amp;quot; variable specifies the blend factor, while &amp;quot;_Texture1&amp;quot; and &amp;quot;_Texture2&amp;quot; specify the two textures to be blended. &lt;br /&gt;
&lt;br /&gt;
Note that when _Blend=0, _Texture1 will be selected and when _Blend=1, _Texture2 will be selected.&lt;br /&gt;
&lt;br /&gt;
==More==&lt;br /&gt;
&lt;br /&gt;
[[Category: Unity 3.x shaders]]&lt;br /&gt;
[[Category: Cg shaders]]&lt;br /&gt;
[[Category: Transparent]]&lt;br /&gt;
[[Category: Unlit]]&lt;br /&gt;
[[Category: Blending]]&lt;br /&gt;
&lt;br /&gt;
NOTE: The original shader is part of the Unity default shaders. The credits for those belong to the respective authors. I have merely added the ability to blend between two textures.&lt;br /&gt;
&lt;br /&gt;
==Shader Files==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shaderlab&amp;quot;&amp;gt;&lt;br /&gt;
Shader &amp;quot;Custom/TransparentCutoutSoftEdgeBlendedUnlit&amp;quot; { &lt;br /&gt;
Properties {&lt;br /&gt;
	_Color (&amp;quot;Main Color&amp;quot;, Color) = (1, 1, 1, 1)&lt;br /&gt;
	_Cutoff (&amp;quot;Base Alpha cutoff&amp;quot;, Range (0,.9)) = .5&lt;br /&gt;
	_Blend (&amp;quot;Blend&amp;quot;, Range (0, 1) ) = 0.5 &lt;br /&gt;
	_Texture1 (&amp;quot;Texture 1&amp;quot;, 2D) = &amp;quot;&amp;quot; &lt;br /&gt;
        _Texture2 (&amp;quot;Texture 2&amp;quot;, 2D) = &amp;quot;&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
SubShader {&lt;br /&gt;
	Tags { &amp;quot;Queue&amp;quot;=&amp;quot;AlphaTest&amp;quot; &amp;quot;IgnoreProjector&amp;quot;=&amp;quot;True&amp;quot; &amp;quot;RenderType&amp;quot;=&amp;quot;TransparentCutout&amp;quot; }&lt;br /&gt;
	Lighting off&lt;br /&gt;
	&lt;br /&gt;
	// Render both front and back facing polygons.&lt;br /&gt;
	Cull Off&lt;br /&gt;
	&lt;br /&gt;
	// first pass:&lt;br /&gt;
	//   render any pixels that are more than [_Cutoff] opaque&lt;br /&gt;
	Pass {  &lt;br /&gt;
		CGPROGRAM&lt;br /&gt;
			#pragma vertex vert&lt;br /&gt;
			#pragma fragment frag&lt;br /&gt;
			&lt;br /&gt;
			#include &amp;quot;UnityCG.cginc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			struct appdata_t {&lt;br /&gt;
				float4 vertex : POSITION;&lt;br /&gt;
				float4 color : COLOR;&lt;br /&gt;
				float2 texcoord : TEXCOORD0;&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			struct v2f {&lt;br /&gt;
				float4 vertex : POSITION;&lt;br /&gt;
				float4 color : COLOR;&lt;br /&gt;
				float2 texcoord : TEXCOORD0;&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			sampler2D _Texture1;&lt;br /&gt;
			sampler2D _Texture2;&lt;br /&gt;
			float4 _Texture1_ST;&lt;br /&gt;
			float4 _Texture2_ST;&lt;br /&gt;
			float _Cutoff;&lt;br /&gt;
			float _Blend;&lt;br /&gt;
			&lt;br /&gt;
			v2f vert (appdata_t v)&lt;br /&gt;
			{&lt;br /&gt;
				v2f o;&lt;br /&gt;
				o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);&lt;br /&gt;
				o.color = v.color;&lt;br /&gt;
				o.texcoord = TRANSFORM_TEX(v.texcoord, _Texture1);&lt;br /&gt;
				return o;&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			float4 _Color;&lt;br /&gt;
			half4 frag (v2f i) : COLOR&lt;br /&gt;
			{&lt;br /&gt;
				half4 col = lerp(tex2D(_Texture1, i.texcoord),tex2D(_Texture2, i.texcoord), _Blend);&lt;br /&gt;
				clip(col.a - _Cutoff);&lt;br /&gt;
				return col;&lt;br /&gt;
			}&lt;br /&gt;
		ENDCG&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Second pass:&lt;br /&gt;
	//   render the semitransparent details.&lt;br /&gt;
	Pass {&lt;br /&gt;
		Tags { &amp;quot;RequireOption&amp;quot; = &amp;quot;SoftVegetation&amp;quot; }&lt;br /&gt;
		&lt;br /&gt;
		// Dont write to the depth buffer&lt;br /&gt;
		ZWrite off&lt;br /&gt;
		&lt;br /&gt;
		// Set up alpha blending&lt;br /&gt;
		Blend SrcAlpha OneMinusSrcAlpha&lt;br /&gt;
		&lt;br /&gt;
		CGPROGRAM&lt;br /&gt;
			#pragma vertex vert&lt;br /&gt;
			#pragma fragment frag&lt;br /&gt;
			&lt;br /&gt;
			#include &amp;quot;UnityCG.cginc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
			struct appdata_t {&lt;br /&gt;
				float4 vertex : POSITION;&lt;br /&gt;
				float4 color : COLOR;&lt;br /&gt;
				float2 texcoord : TEXCOORD0;&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			struct v2f {&lt;br /&gt;
				float4 vertex : POSITION;&lt;br /&gt;
				float4 color : COLOR;&lt;br /&gt;
				float2 texcoord : TEXCOORD0;&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			sampler2D _Texture1;&lt;br /&gt;
			sampler2D _Texture2;&lt;br /&gt;
			float4 _Texture1_ST;&lt;br /&gt;
			float4 _Texture2_ST;&lt;br /&gt;
			float _Cutoff;&lt;br /&gt;
			float _Blend;&lt;br /&gt;
&lt;br /&gt;
			v2f vert (appdata_t v)&lt;br /&gt;
			{&lt;br /&gt;
				v2f o;&lt;br /&gt;
				o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);&lt;br /&gt;
				o.color = v.color;&lt;br /&gt;
				o.texcoord = TRANSFORM_TEX(v.texcoord, _Texture1);&lt;br /&gt;
				return o;&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			float4 _Color;&lt;br /&gt;
			half4 frag (v2f i) : COLOR&lt;br /&gt;
			{&lt;br /&gt;
				half4 col = lerp(tex2D(_Texture1, i.texcoord),tex2D(_Texture2, i.texcoord), _Blend);&lt;br /&gt;
				clip(-(col.a - _Cutoff));&lt;br /&gt;
				return col;&lt;br /&gt;
			}&lt;br /&gt;
		ENDCG&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
SubShader {&lt;br /&gt;
	Tags { &amp;quot;IgnoreProjector&amp;quot;=&amp;quot;True&amp;quot; &amp;quot;RenderType&amp;quot;=&amp;quot;TransparentCutout&amp;quot; }&lt;br /&gt;
	Lighting off&lt;br /&gt;
	&lt;br /&gt;
	// Render both front and back facing polygons.&lt;br /&gt;
	Cull Off&lt;br /&gt;
	&lt;br /&gt;
	// first pass:&lt;br /&gt;
	//   render any pixels that are more than [_Cutoff] opaque&lt;br /&gt;
	Pass {  &lt;br /&gt;
		AlphaTest Greater [_Cutoff]&lt;br /&gt;
		SetTexture [_Texture1] {&lt;br /&gt;
			constantColor [_Color]&lt;br /&gt;
			combine texture * constant, texture * constant &lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// Second pass:&lt;br /&gt;
	//   render the semitransparent details.&lt;br /&gt;
	Pass {&lt;br /&gt;
		Tags { &amp;quot;RequireOption&amp;quot; = &amp;quot;SoftVegetation&amp;quot; }&lt;br /&gt;
		&lt;br /&gt;
		// Dont write to the depth buffer&lt;br /&gt;
		ZWrite off&lt;br /&gt;
		&lt;br /&gt;
		// Only render pixels less or equal to the value&lt;br /&gt;
		AlphaTest LEqual [_Cutoff]&lt;br /&gt;
		&lt;br /&gt;
		// Set up alpha blending&lt;br /&gt;
		Blend SrcAlpha OneMinusSrcAlpha&lt;br /&gt;
		&lt;br /&gt;
		SetTexture [_Texture1] {&lt;br /&gt;
			constantColor [_Color]&lt;br /&gt;
			Combine texture * constant, texture * constant &lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Sahilramani|Sahil Ramani]] 10:51, 17 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Sahilramani</name></author>	</entry>

	</feed>