Monday 4 August 2014

Double Sided Diffuse material, Unity

I wanted to make a flag in Unity using the Interactive cloth tool, but found that the shader I had wouldnt allow me to view the flag on both sides, creating wholes in the mesh from one side of the flag and not allowing me to see the flag from the other. 

I have edited the script to make this a double sided diffuse. Firstly downloading the built in shaders you can find on the archive. Then opening the Normal Diffuse shader in Unity and opening Mono Develop. 

Edited double sided script for Diffuse Shader

You can see that in the shader I have put DoubleSided_IF/Diffuse"
I have then added Cull Off to the Subshader section.



Original Script for Diffuse Shader

Flag before double sided shader

Edit your materials shader to the Double Sided Diffuse in the drop down menu

Flag after double sided shader



No comments:

Post a Comment