Comments

Log in with itch.io to leave a comment.

(+1)

This is great!

can we add Trees? I mean a vertical item?

It should be possible to make billboarded sprites. That's how the car in the demo is made. But to get proper projection, the relative position of an object to the camera would have to be calculated first. There's some code already in the shader package you can buy but I didn't implement any billboarded sprites (other than the player).

(1 edit)

Any chance you could implement billboards that are non-players, that keep their location on the floor relative to the camera? I've been tinkering with it some, but can't figure it out.

Also: how might I go about normalizing depth? I usually use depth=room_height-y, but the object doesn't draw with the shader when using that depth sorting method.

God, it's been so long since I touched this but it should be possible. I'll have to look into the code again to tell you how to calculate the relative coordinates of a billboard object so that you can place it accurately.
As for depth, it should be relative to the calculated y coordinate of an object but I didn't implement it because I struggled with it myself. Should I figure it out, I could get back to you.

I have make a quick tutorial on how to make billboards using the code already included in the shader code examples. It's pretty easy, actually.
https://mrlevrocks.itch.io/mode7/devlog/812974/how-to-add-billboards-to-mode-7-s...
Normalizing depth might be a bit harder but what you could do is pass the calculated height from the draw event into a defined variable and then set that in the end step event. Tell me if that works.

(+1)

Thanks for this! 

It is no longer just possible, it is done. Check out this tutorial I made on how to.
https://mrlevrocks.itch.io/mode7/devlog/812974/how-to-add-billboards-to-mode-7-s...

(+1)

epic