-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Surfaces are too dark #25
Comments
Interesting, I only remember the second one through all my testing. I will look! |
It looks like it was dark at 98c3740, my first big merge (check out and run |
If it helps to debug, it also happens in: file:///Users/sritchie/code/js/mathbox/examples/test/vertexcolor.html It does NOT seem to happen in which seemed surprising. |
Whatever happened, I'm fairly certain it is not related to Shadergraph. I dropped an old version of Shadergraph into the current repo and stuff was still dark. I also plugged in an old v0.05 version of shaders.js (recall it used to get built to build/shaders.js) and things were still dark. Znah's is not as dark as modern, but it does have dark lines. Steven's original looks best :/ Hope we can get back to that. EDIT: I think there are two separate issues: Shading and line color. If you turn off the lines, znah and 0.0.5 look the same. |
@ChristopherChudzicki I agree. here are some clues:
So that makes me suspect something in https://github.com/unconed/mathbox/blob/0.0.5/src/render/meshes/base.coffee#L120-L186... but they really read the same. |
I'm pretty sure this does have an effect in 0.0.5, although the effect is not visible unless you're using a shaded surface. If not using shaded surface, the gridlines and surface are exact same color and you can't differentiate between the two. (I think the original intent was that the grid lines would be. adarker shade of the main surface color. I don't understand why the gridlines turned black, but I think I do understand why they were not behaving as intended in 0.0.5. Changing the x/y/z in this code to r/g/b fixes the lineX lineY issue in current master, and changing the corresponding lines in the old coffeescript code fix it in 0.0.5. mathbox/src/primitives/types/draw/surface.js Lines 278 to 288 in 4fd08d6
As for the why the shaded surface itself is darker... I spent a while investiating that this weekend. I still do not fully understand. The shading is done by the two GLSL shader snippts As best I can tell, there's an issue with I'll open a PR for the |
Fixed by #27. |
Left: v0.0.5 / Right: v2+
@sritchie I dunno if this is a consequence of changes we've made in Mathbox, or a consequence of the ThreeJS upgrades. Do you have any idea? I think you've looked at more versions of ThreeJS than I have. Otherwise... I'll try to learn something about ThreeJS :)
The text was updated successfully, but these errors were encountered: