Not sure if this goes here... Its a question about shaders

Hello,

I have a question but im not sure if this goes here cause its not theoretically C# but about shaders.

Ive been following CatLike Codings tutorials about the basics of Unity and on the 2nd one he started discussing shaders.

The code is supposed to cause the colors of the instantiated prefab to change with its position on the y coordinate, but the color always remains black.

The shader is attatched to the matieral shader option, and the material is attached to the prefab.

If this is the wrong location for such questions i do apologise.

Shader "Graph/Point Surface"
{
   Properties{
       _Smoothness("Smoothness", Range(0,1)) = 0.5
   }
       SubShader{
       CGPROGRAM
   #pragma surface ConfigureSurface Standard fullforwardshadows
   #pragma target 3.0
       struct Input {
               float3 worldPos;
           };
       float _Smoothness;
       void ConfigureSurface(Input input, inout SurfaceOutputStandard surface) {
           surface.Albedo.rg = input.worldPos.xy * 0.5 + 0.5;
           surface.Smoothness = _Smoothness;
       }
       ENDCG

   }

       FallBack "Diffuse"
}

The Shaders forum?

OMG, i cant believe i missed that… I must be blind. Thank you very much :slight_smile: