Log in with to leave a comment.

(2 edits)

It seems to be very well written and commented. Unfortunately, it lacks one critical thing: Matrix translation (position and rotation) support.

In explaining, anything that moves and/or rotates within the world will not be lit properly, meaning it's almost useless for a game because you will undoubtedly have moving entities that need to get lit, such as enemies, spinning item pickups, moving platforms, etc. That said, perhaps I'm doing my matrix translations wrong somehow?

To demonstrate the problem, I modified the floor in the original code to shift back and forth, like so:

//send the frozen models over to be drawn
var _mat_translate = matrix_build(sin(current_time/500)*50, sin(current_time/500)*50, 0, 0, 0, 0, 1, 1, 1);
matrix_set(matrix_world, _mat_translate);
matrix_set(matrix_world, matrix_build_identity());
-- CODE END --
(Note: I'm assuming it's okay to post that snippet of code, since it really doesn't show anything related to the workings of the asset.)

When you run the project with the above code, the lights will shift along with the floor, rather than the desired result of them staying in place.
I assume the shader needs to get the translation information passed in somehow, but I'm having trouble figuring out exactly how to do that.

Again, a great asset and easily worth the price, but severely limited in its usability, due to this issue. As it stands, I cannot use it for what I purchased it for, unfortunately.

A very good point and I agree that it’s pretty limited in that sense. I suppose in my mind I was I had only focused on lighting the static level and didn’t even consider moving entities, so that’s a massive oversight on my part 

I appreciate the response. Even though it wasn't useful in how I had hoped, it still helped me get a better understanding of shaders, so I'm a happy customer. Thank you.