afonsolage / projekto

Voxel game made with Bevy Engine
MIT License
59 stars 4 forks source link

Texturing #25

Closed afonsolage closed 2 years ago

afonsolage commented 2 years ago

This PR adds texture capabilities to the game. I've made some basic textures on GIMP and added just 4 basic textures to get things done.

afonsolage commented 2 years ago

Next step is load the atlas onto the AssetServer and update the shader to render the correct UV

afonsolage commented 2 years ago

Now that I'm reading my own PR, I think doesn't make sense to have multiple atlases for KindDescription, since it should be a single atlas always.

I'll change this...

afonsolage commented 2 years ago

A very primitive texturing is working:

image

There are some issues to be solved: 1- Fix texture rotation; 2- Add texture tiling; 3- Check if texture is working for different kinds;

afonsolage commented 2 years ago

In order to do the texture tiling, the following steps needs to be done, if I'm not mistaken:

afonsolage commented 2 years ago

Texture tiling is working fine.

image

Next steps:

afonsolage commented 2 years ago

image

Texture rotation fixed

afonsolage commented 2 years ago

Found a bug were sometime the mesh::merge_faces ignores the voxel kind:

image

Edit: Fixed!

afonsolage commented 2 years ago

I wasn't able to reproduce: Fix chunks sometimes not rendering (maybe something related to system ordering)

Skipping it for now

afonsolage commented 2 years ago

Ok I think everything is good now.