Skip to content

Conversation

ICaxapI
Copy link

@ICaxapI ICaxapI commented Aug 3, 2024

Corrected UV coordinates for the negative y face rendering. These changes ensure proper texture alignment for bottom sides when using ambient occlusion (AO) and regular rendering.

@ICaxapI
Copy link
Author

ICaxapI commented Aug 3, 2024

image
->
image

@GregoriusT
Copy link
Member

GregoriusT commented Aug 3, 2024

How does this affect Bottom Facing Sensor Blocks? Because if it messes those up, I would be forced to rewrite a ton of geometric code, which needs way too much trial and error for me.

@ICaxapI
Copy link
Author

ICaxapI commented Aug 3, 2024

image
Yeah, it's broken, I'll try to fix the code responsible for this rendering. Is there anything else worth paying attention to?

@GregoriusT
Copy link
Member

the reason i never fixed this is because the UVs somehow have a different effect on full blocks vs nonfull blocks. That is one of the other reasons.

@ICaxapI
Copy link
Author

ICaxapI commented Aug 4, 2024

image
Well, added a simple check by the texture name, by it we determine whether to reflect the texture. If the name matches the whitelist, then we reflect it, unless it's a complete block with unchanged borders (like Burning boxes, for example).
Dirty, hacky, but it works ._.

@ICaxapI
Copy link
Author

ICaxapI commented Aug 4, 2024

Overall, if we have more groups of textures that need to be added to the "whitelist", we can make it a separate function with a collection that we will compare with, and put this list somewhere in gregapi.data.CS, judging by similar checks in the project.

@ICaxapI
Copy link
Author

ICaxapI commented Aug 4, 2024

I hope I correctly understood the project's philosophy regarding storing utils functions and static data.

Introduced a utility method to determine if textures need flipping based on texture groups and block bounds. Updated rendering functions to use this logic, ensuring correct texture orientation for specific cases.
Corrected UV coordinates for the negative y face rendering. These changes ensure proper texture alignment for bottom sides when using ambient occlusion (AO) and regular rendering.
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.

2 participants