Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use shader to render blocks #100

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Use shader to render blocks #100

wants to merge 7 commits into from

Conversation

Jimx-
Copy link
Collaborator

@Jimx- Jimx- commented Apr 22, 2019

This makes it possible to create better visual effects like lighting

@r58Playz
Copy link

I'll try to test that.

@r58Playz
Copy link

Works great!

@Nebual
Copy link
Collaborator

Nebual commented Apr 23, 2019

Thanks for fixing the block cracking, that was bugging me :)
3D Block Icons seem to work well too! I've pulled those 4 commits into master (since you pushed them to my merged python3 branch).

Block shaders is a great addition! Though there's something odd going on with the time of day; the lighting doesn't seem to line up with where the sun image is positioned, with my world appearing to be in full shadow when the sun is at high 12:00. Also when I try flying (tab) into the sky, the world becomes much brighter, so there's something odd occurring with view occlusion...

@Nebual
Copy link
Collaborator

Nebual commented Apr 23, 2019

I tidied up + slowed down the passage of time to 20m/day cycle (matching Minecraft pacing), if you want it fast like before for testing shaders, you can use python main.py --fast which brings it up to 1m/day.

I also tweaked get_sun_position() so the shader appeared to follow the visual sun, let me know if I'm misinterpreting it!

@Jimx-
Copy link
Collaborator Author

Jimx- commented Apr 23, 2019

Thanks for the comment!
I'm not quite sure about the sun position because I used the same formula in sun_vertex() to calculate the sun position so the lighting should follow the visual sun... I guess there might be something wrong with the face normals passed to the shader and I'll check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants