I'm relatively new to the topic of Unity shaders, and have hit a problem with initialization (I believe because Unity is using DirectX11).. The error is "Shader Warning: Output Value 'vert' is not completely initailized on line 46 (on d3d11)" ( https://puu.sh/vTPsU/e1119ad1ec.png ), and here's a copy of the code. If anyone could help me out, I'd greatly appreciate it. Code (CSharp): // Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' Shader "Custom/FresnelTextureEffect" { Properties{ _MainTex("Main Texture", 2D) = "white" {} _Colour("Main Colour", Color) = (1,1,1,1) _SpecColour("Specular Colour", Color) = (1,1,1,1) _SpecShininess("Specular Shininess", Range(1.0, 100.0)) = 2.0 _FresnelPower("Fresnel Power", Range(0.0, 3.0)) = 1.4 _FresnelScale("Fresnel Scale", Range(0.0, 1.0)) = 1.0 _FresnelColour("Fresnel Colour", Color) = (1,1,1,1) } SubShader { Pass { Tags {"LightMode" = "ForwardBase"} CGPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" struct appdata { float4 vertex : POSITION; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; }; struct v2f { float4 pos : SV_POSITION; float3 normal: NORMAL; float2 texcoord : TEXCOORD0; float4 posWorld : TEXCOORD1; }; float4 _LightColour0; float4 _Colour; sampler2D _MainTex; float4 _MainTex_ST; float4 _SpecColour; float _SpecShininess; v2f vert(appdata IN) { v2f OUT; OUT.pos = mul(UNITY_MATRIX_MVP, IN.vertex); OUT.posWorld = mul(unity_ObjectToWorld, IN.vertex); OUT.normal - mul(float4(IN.normal, 0.0), unity_ObjectToWorld).xyz; OUT.texcoord = TRANSFORM_TEX(IN.texcoord, _MainTex); return OUT; } float4 frag(v2f IN) : COLOR { float4 texColour = tex2D(_MainTex, IN.texcoord); float3 normalDirection = normalize(IN.normal); float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz); float3 viewDirection = normalize(_WorldSpaceCameraPos - IN.posWorld.xyz); float3 diffuse = _LightColour0.rgb * _Colour.rgb * max(0.0, dot(normalDirection, lightDirection)); float3 specular; if (dot(normalDirection, lightDirection) < 0.0) { specular = float3(0.0, 0.0, 0.0); } else { specular = _LightColour0.rgb * _SpecColour.rgb * pow(max(0.0, dot(reflect(-lightDirection, normalDirection), viewDirection)), _SpecShininess); } float3 diffuseSpecular = diffuse + specular; return float4(diffuseSpecular, 1) * texColour; } ENDCG } } }