r/libgdx • • Jan 11 '20

Some paletted 2D lights using a normal map

65 Upvotes

16 comments sorted by

5

u/Amradude Jan 11 '20

That looks very good. OC?

2

u/_Diocletian_ Jan 25 '20

I am assuming OC doesn't stand for OverClocking ? :p

2

u/Amradude Jan 25 '20

You are assuming correct, no I meant OC, as in original content. As in did you make it? And further maybe if you had a repo one could check out 👍

5

u/_Diocletian_ Jan 25 '20

Ha ! Yeah that's my code, but the palette is from pico8 :)

As for the lighting effect, I took a lot of inspiration from https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson6

The source code is available here: https://github.com/JulienBe/SandsOfTime

3

u/Amradude Jan 27 '20

Good man!

1

u/Amradude Jan 25 '20

Never mind, just saw your link in the comments :-)

3

u/[deleted] Jan 12 '20 edited Jan 25 '20

Wow! Can you do some tut for that? I’d like to learn that!

2

u/_Diocletian_ Jan 25 '20

I'm short on time, but I'd like to ! :) In the mean time, all my code is online, you can see the light and palette shader here https://github.com/JulienBe/SandsOfTime/blob/master/assets/shaders/light/fragment.glsl

1

u/[deleted] Jan 25 '20

Thanks! Do you have a YouTube channel or something?

1

u/_Diocletian_ Jan 25 '20

You can follow me on twitter https://twitter.com/particulitis :)
I post random stuff and libGDX stuff, so any tutorial would definitely appear there

2

u/[deleted] Jan 25 '20

Bugger! I don’t use Twitter. Well, I got you on reddit.

1

u/_Diocletian_ Jan 25 '20

And it's now casting shadows :)
https://imgur.com/gallery/MudaEAY

1

u/[deleted] Jan 25 '20

Nice! I think shadows would look much better if they weren’t pure black. Nice job.

1

u/_Diocletian_ Jan 25 '20

Actually I could easily have semi transparent stuff.. Hmm.. It was bumped up for the gif, but that's a good remark !
I will just keep the highest blocker value I've seen

0

u/[deleted] Jan 11 '20

[deleted]

1

u/_Diocletian_ Jan 25 '20

Yep, from one of the themed bundled in Manjaro. I know I should change that :D