Smooth Lighting question


New Member
I've just joined the community and have been playing around with Terasology in Intellij and I gotta say great work guys!

For the last year I've had a side project in JMonkeyEngine and have a working voxel game/engine at the moment. It's nothing close to Terasology. I've been trying to pull little things here and there from Terasology but I find myself wanting to ditch my project and start developing in it.

Anyway, my lighting is very blocky in my game and I have been trying to find where the Terasology code for smooth lighting is. I've been looking at block_vert.glsl and block_frag.glsl. There are others like lightBufferPass and lightGeometryPass that I'm not sure of. I'm a Java dev for 10 years but just now getting into shaders.

My lighting is blocky because I'm doing a vertex shader and calculating a light value based on the block light and the time of day. I'm figuring I need a fragment shader to make it smoother but it seems like you would need to know the location of each light source within your shader and I'm just not sure how all that works.

I have attached a look at what I'm talking about with my lighting in case it helps to explain my problem.

Any pointers on where to look would be appreciated.



Org Co-Founder & Project Lead
Hey @chapp007 and welcome :)

Our lighting has gone through a few rounds of changes. @begla was the initial wizard that got it all to work and had plenty of knowledge to share but isn't seen much around anymore.

@Immortius knows it too and actually came from a similar situation as you, having his own little proof of concept voxel renderer called NightBlock that included blocky lighting and so on. Then he brought his toys over here and helped us make Terasology better. Would be great to see you do the same!

@Josharias has done an occasional bit of work on the lighting, as did @Michael, both trying to just make the world look nicer more so than necessarily refactoring all the rendering things. Probably I'm forgetting a few others like that.

Finally and most recently + majorly @manu3d and @tdgunes have been working on a major refactor of rendering, although I think that has been more structural and effect-based than centered around lighting just yet. They probably would have an idea about what you're asking about in any case!

Hoping one of them or somebody else will come on by with some details soon :)


New Member
Thanks for the quick reply.

I intend to contribute and maybe even ditch my current side project. I think i will learn more with something like Terasology since game dev isn't my day job.

I've seen many TODOs in the code that I might take a stab at. Plus I think I saw a wiki page somewhere with suggested projects.

Right now I'm trying to get a feel of what's out there already. I may start changing ingredients shaders locally to see if I can get a birds eye view of what shader does what.