-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove all bump mapping and parallax occlusion related code. #10487
Conversation
I can review and test this, although i feel a little underqualified in some areas of the changes =) |
@HybridDog FYI since you've worked in this area. |
Interesting how the documentation reveals these shaders are actually 'experimental', unfinished and buggy. It is more of a mess than i realised.
Oddly, relief mapping mode is actually set as the default mode, and fastfaces are everywhere. |
I will make this my top priority for review. |
@paramat Thanks! You already caught two issues - I've been sloppy. |
Sorry, that was @HybridDog . |
Where did that come from? |
@TheTermos Oops. That was @HybridDog. I truly apologize! |
My testing in the issue which shows pixel wrapping reminded me of something i thought i would mention. The wrapping of pixels from the opposite edge, issue #2815 , was fixed in 655fc60 by adding the tiledef fields 'tileable_vertical', 'tileable_horizontal'. Perhaps we should leave these tiledef fields present in code, for now at least, as they are likely to be needed by any new implementation of bumpmapping / parallax occlusion. We might decide to remove these tiledef fields, but i suggest that we consider and do that in a later PR, to not bloat and delay this PR. |
Thanks @paramat, I don't see that I'm removing any tiledef fields in this PR. Happy to shrink the scope of this, which part are you referring to? |
Sorry to be unclear, i do not mean to imply you are removing those in this PR, you are not. I am just mentioning the related tilespec code and suggesting we leave that in, for now at least. |
In client/shaders/object_shader/opengl_fragment.glsl, do the following need removing?
In void main(void):
|
In client/shaders/nodes_shader/opengl_fragment.glsl, do the following need removing?
|
In client/shaders/nodes_shader/opengl_vertex.glsl, does the following need removing?
|
I tested. Main menu is fine and everything seems to work ok. |
Arrgghh. Thanks @paramat . I'll do a second pass through what can be removed and I'll remove the tilespec doc. I wasn't sure if I wanted to remove all the uniforms from the shaders. I'll double check these. |
Ok i see. Although it will all still be in history to refer too, so not sure if there is advantage to leaving some stuff in creating a confusing mess. I remember that 'vertex tangent' stuff was added by RBA purely for bumpmapping and parallax occlusion, in this commit 43fcfbf I did a search for 'tangents' in current code and found some extra stuff not in your PR: Line 381 in 9bba52c
Line 978 in 9bba52c
|
I feel the following needs to be left in:
|
The failure on Android appears unrelated. |
That seems fine to me. I think this has a good balance of how much to remove. |
A related warning during compilation:
|
All my previous comments are attended to, rereviewed code, retested, all seems fine. |
I saw that warning too, but I did not want remove that enum. Hmm... I could. |
It looks like a connection failure unrelated to these changes, so being persistent and this PR only seems odd. Maybe @rubenwardy could advise? The compilation warnings are not a problem so consider my approval given, although we might want to get some input on that build failure before merging. |
That's a temporary error due to website downtime, I've restarted the build |
Good to know, and thanks. |
Can be merged now. |
Actually lemme look at that enum. If it can be safely removed I'll do that and then merge. Otherwise I'll merge as is. |
It's not an enum anyway, I just removed he unused variables, which avoids that warning, going to merge soon. |
Ok looks fine. |
See #10479 for discussion.
This PR removes bump mapping, parallax occlusion, and normal mapping code, since it was buggy and not fully implemented.
This simplifies the shader code and hopefully makes it easier to start over.
Note that this also remove the normal texture feature - since it normal textures are no longer used for anything.