Lighting System First Full Build


Wew! Lighting is working now so i'm quite happy with where it is at.

I recently added some new code to the lighting system when compared to yesterday's lighting code which I expalined in this devlog https://andrewnreinke.itch.io/funmi/devlog/302070/lighting-system-b so read up if you're interested!
Also, the code is shown / roughly explained here on my Twitter: https://twitter.com/AndrewNReinke/status/1446889093976129536

So the lighting as of today is now adding some tint beyond just setting the world to have one single global light that's emulating the sun. I still haven't added any sort of notion of ambient light due to it just not being required with the way that I wrote the code as of now.

This is where the post now turns into more of a tech discussion. The reason why is that today's build actually could be rendered by using some textures and just having "ambient light" or nothing at all really.

What I mean by this is that when you play the game, you'll notice that the water grid has sort of a banding effect from the center outwards toward the corners. This is due to that global sun light that I mentioned but that banding could be reproduced via a simple texture. The current system is producing it by having all the vert colors be a solid color but just changing the texel by the amount of light hitting the current texel depending on if it is seen and what not. But yea, I could actually save pointless processing time since the water grid doesn't change significantly enough with regards to how light is effecting it.
That being said, the water grid, when it gets a large amount of water density such that a "wave" rises, does actually technically benefit from the lighting being dynamic and not just painting on some banding texture but it is hardly noticable imo.
So in other words, i'm being lazy here and just keeping the complexity stack I have to produce the floor image.

Buuuut I will say that the boat does technically benefit from the light source as if you are launched upwards, the boat will get more bright IE more lit up! So what I have atm isn't totally useless and is "kinda" validated by this. But, since this is literally the only thing that realistically is benefiting from the big ol dynamic sun light, I really should just have this be a corner case in the render and just do the math for only the boat for super mega optimze mode.

I also haven't mentioned the fact that prior to this update (not released on itch tho) I still had some pipeline issues in the sense that the combo display arrows in the background and the Wheeeeee bars all got lit by the light which would give you not good looking arrow / bar graphics. That has since been fixed which makes this build the offical first "build with light"!

Now it's time to go look into an easy way to do shadows / just represent occluders in the render to determine how shadows should be cast onto whatever texture / change the model's lighting depending on where light source hits it and what not. So stay tuned for that when it comes out tomorrow!

Thank you for reading and please tell me your thoughts on the game! Hateful parts, parts you like, whatever. Have an awesome day :]

Files

Funmi_Windows.exe 229 kB
Oct 09, 2021

Get Funmi

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.