- Home /
How to do per texel lighting?
I'm currently working on a 3D game that has low resolution textures. (32x32) Lighting needs to be real time, but I only want the lighting to change per texel instead of having a light gradient running over every pixel in the texture.
Can anyone point me in the light direction?

the only thing i can think of is to actually render the game with a really low res like 320*240 and then upscale it. Or perhaps with a screen space effect from the asset store.
That is a possibility, but it would impact the shape of my meshes. A very different, but cool, effect. I am going to experiment with render texture and post shaders, but first I wanted to see what this would give.
Personally i don't think it looks bad at all now. You could of course try adding normalmapping to the materials, which would give the impression of the lighting being low resolution.
Thanks for the tip, that would definitely be interesting. The reason I want to try this is because I want to find a unique look for my game.
$$anonymous$$aybe you can write your own shader that, during lighting, snaps to the same light intensity value for each pixel, like rasterising the light.
Or you check out this
Answer by Pangamini · Mar 26, 2015 at 09:45 AM
Write a custom lighting model for your shaders that rounds up the interpolated data (used in lighting calculation) from your vertex shader. I won't give you an exact complete solution, but this is definitely the direction you want to go.
Your answer