No falloff on lights?

Hello,

I have pretty much zero experience with shaders and I was wondering if it is possible to make a shader that makes it so lights don’t have any falloff at all. Instead, they would have hard edges.

If it’s possible, what exactly do I need to know to write it?

Thanks in advance.

p.s. I’m trying to learn ShaderLab right now, so if you want to get technical with it. By all means, please do.

This is as far as I have gotten in the few hours I have attempted to create the shader.

Shader "HardLight" {
   Properties {
      _MainTex ("Texture", 2D) = "white" {}
     
    }
    SubShader {
      Tags { "RenderType" = "Opaque" }
      CGPROGRAM
      #pragma surface surf SimpleLambert

      half4 LightingSimpleLambert (SurfaceOutput s, half3 lightDir, half atten) {
          half NdotL = dot (s.Normal, lightDir);
          half diff = NdotL * 0.5;
          half4 c;
          c.rgb = s.Albedo * _LightColor0.rgb * (NdotL * atten * 500);
          c.a = s.Alpha;
          return c;
      }

      struct Input {
          float2 uv_MainTex;
      };
      
      sampler2D _MainTex;
      void surf (Input IN, inout SurfaceOutput o) {
          o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
      }
      ENDCG
    }
    Fallback "Diffuse"
  }

There is only one problem I’m trying to work out right now. I’m trying to take out the squares it leaves behind by the lights. I have a few ideas, but I’m not sure if they’ll work.

Squares? What squares? Can you post a screenshot?

It was a problem with my scene. I accidentally had a lot of lights in the scene. It works if you keep it reasonable though.