- Home /
Help with lighting needed
I'm working on a first-person roguelike in pixel art style. The idea was inspired by such projects as Barony and Delver. Now I have some problems with default Unity lighting system. Here's the example:
- Delver
And here's my result/desired result:
Currently I'm using point light. If I assign too large brightness value, I get too bright point at center and dark surrounding. I tried to extend it's radius and screenshot shows what I've got.
How could I get Delver-like lighting effect? It would be cool to get so-called "per texel lighing" as @fusecore intended to achieve here: https://answers.unity.com/questions/932439/how-to-do-per-texel-lighting.html
You can remove that "glossy" look on the standard shader by setting its $$anonymous$$etallic
parameter to 0. I was able to get a similar look by setting the material's albedo tint to black and have the lights use a mostly-black version of orange / yellow:
End Result:
Wall $$anonymous$$aterial and Light (ignore the clutter, forum attachment limit):
Hm. Interesting, but it doesn't work in my case). If I change albedo to black then this comes out:
EDIT: I used standart shader with $$anonymous$$etallic set to zero.
Can you link the picture again, or drop it onto Imgur or something? Didn't show up. :-\
Answer by fusecore · Jul 04, 2018 at 09:30 AM
Hi! So you will definitely need to write your own material shader in order to do this correctly. But perhaps the new Shader graph will help here to make it easier if you're daunted by shader code.
A quick off the top of my head idea would be to add a grab pass to the shader and even out each texel's colour. The problem here I believe could be that the shader needs to know the size of the texels on the 0-1 UV scale and if there's an offset.
A cheap way to get nice results would be to not use the Standard shader, but something like Legacy>Transparent>BumpDiffuse.
Another idea is to use an indexed colour shader.
Like this: link text
Send me a DM on twitter or mail if you wanna chat! :)
Wow! I didn't expect to see you here, but in any case, thanks for your reply ). Shader Graph is something new for me but I will try this solution
Your answer
Follow this Question
Related Questions
Unity2D Pixels deforming when moving 0 Answers
How to check if mouse is above or below player? 2 Answers
Making a more blocky lighting shader 0 Answers
Is it possible to create a light like this in unity? 1 Answer
2d normal mapping with pixel game issue 0 Answers