Hey all, was wondering how I can go about making a custom shader for a 2d spot light. Basically I just want the light and how it tapers off to appear pixelated instead of a nice smooth gradient.
I achieved the second one by using a sprite light, but it is not flexible scaling it up does not maintain the 8x8 pixelated light look that I want. And i do not want to make a new sprite for every single situation.
I’ll make a wild guess and say if you change the _LightLookup and/or the _FalloffLookup texture with a pixelated one it will give you what you want but I am not sure if it’ll work nor how you can change those textures.
For reference, here is a simple scene with a single point light. I believe they use the aforementioned textures for sampling the falloff of the point lights
Edit: I didn’t see that you wanted a shader, sorry. In that case you can just use a sprite custom lit shader and sample the light texture in discrete points(like a grid).
In this link I have another forum post that uses Light texture for another purpose if you want to read more on that. Just note that it is not complete yet(some small details like not using a sprite renderer on the same gameobject with a shadowcaster2d is not mentioned there yet)