Tuesday, February 12, 2013

Solution to Unity Probelm

So I had this probelm where Unity thought my normals were flipped.

Thankfully after days of going to forums and researching a solution was found.

If you create a Shader script and paste this in

Shader "Custom/NewShader" {

Properties {

        _Color ("Main Color", Color) = (1,1,1,0)

        _MainTex ("Base (RGB)", 2D) = "white" {}

    }

    SubShader {

        Pass {

            Cull Off

            Material {

                Diffuse [_Color]

                Ambient [_Color]

            }

            Lighting On

            SetTexture [_MainTex] {

                Combine texture * primary DOUBLE, texture * primary

            }

        }

    }

}

Then you save. Create a material and select custom in the drop down menu. This will give you the option to pick your "New Shader"   Once you have it set up like that you just pick your texture for the mesh and apply to the mesh. VOILA le done.

No comments:

Post a Comment