Hi I've got this Earth Shader (LWRP) - It is rotating, has some clouds. It's scaled but it is child of the camera (perspective) so it doesn't move with player. I would like the edges to glow. So I modified shader - add some code but glow depends on camera rotation / position. I don't want that. I'm not good with shaders so I don't know how to resolve it. Can you help me? I've got this: Want something like this: Code (CSharp): inline fixed3 AtmosphereColor(float3 worldSpaceDir) { fixed3 Fresnel1 = forwardVector; fixed3 Fresnel2 = (1.0 - dot(normalize(worldSpaceDir), normalize(Fresnel1))).xxx; fixed3 Pow0 = pow(Fresnel2, _AtmosFalloff); fixed3 Saturate0 = saturate(Pow0); fixed3 Lerp0 = lerp(_AtmosNear, _AtmosFar, Saturate0); fixed3 color = Lerp0 * Saturate0; return color; } v2f vert(appdata v) { v2f o; UNITY_INITIALIZE_OUTPUT(v2f, o); o.pos = UnityObjectToClipPos(v.vertex); o.uv = TRANSFORM_TEX(v.uv, _MainTex); o.normal = WorldSpaceNormal(v.normal); float dist0 = length(o.pos.xyz - _CameraPosition * float3(1.0f, 1.0f, 1.0f)) * .025f; dist0 *= -1; dist0 += 2.0f; o.camDistance = pow(dist0, 2.8f)*0.2f; // o.screenPos = ComputeScreenPos(o.pos) - WorldSpaceVertexPos(v.vertex); o.screenPos = ComputeScreenPos(o.pos); return o; } half4 frag(v2f i) : COLOR { half4 color = tex2D(_MainTex, i.uv) * _Color; color.a = 1.0f; float3 screenPos = normalize(i.screenPos); float3 worldNormal = i.normal; fixed rim = 1.0 - saturate(dot(normalize(screenPos), worldNormal)); fixed3 emission = (_RimColor.rgb * pow(rim, _RimPower) + AtmosphereColor(-screenPos)); color.rgb += emission.rgb * _RimIntensity; return color *_Color * float4(float3(i.camDistance, i.camDistance, i.camDistance) *_CamColorDistModifier, 1.0f); //return color *_Color *_CamColorDistModifier; } ENDCG