What I want to do is render the inside of this sphere and make the black part transparent: I have already figured out how to render inside of a sphere using this script: http://www.vrtiginous.com/flippingnormals, but by using this shader, there is no way to edit the albedo values just like what we did in the standard shader: inspector img here: Right now the view is from inside, as you can see, there is a black background behind those mountains. I hope to make the black part to be transparent. img: anyone knows how to fix this?
Why aren't you flipping the normals in your modelling software so you don't have to use special shaders for this?
Hi, i am not using any modeling software because right now i only created one sphere in unity and attach a 360 degree image to it
Do you want the other functionality of the standard shader, or are you happy with how this looks and you only want it to look transparent? If it's the latter then replace a few lines in your shader code with this: Code (csharp): SubShader { Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} Cull Off CGPROGRAM #pragma surface surf Lambert vertex:vert alpha I think that should do it.
That's weird. Try this: Code (csharp): Shader "FlipIt" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 } SubShader { Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } LOD 200 Cull Front CGPROGRAM #pragma surface surf Standard fullforwardshadows vertex:vert alpha:fade #pragma target 3.0 sampler2D _MainTex; struct Input { float2 uv_MainTex; }; half _Glossiness; half _Metallic; fixed4 _Color; UNITY_INSTANCING_BUFFER_START(Props) UNITY_INSTANCING_BUFFER_END(Props) void vert(inout appdata_full v) { v.normal.xyz = v.normal * -1; } void surf (Input IN, inout SurfaceOutputStandard o) { fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; o.Albedo = c.rgb; o.Metallic = _Metallic; o.Smoothness = _Glossiness; o.Alpha = c.a; } ENDCG } FallBack "Diffuse" }
Hi, but there is one small issue, it seems that all the sprite/img I put inside the sphere can't show up...
Play with Render Queue (it's a number in your material settings, it controls the order things are drawn)