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
troika-3d-text render problem without error #16
Comments
Google Chrome | 78.0.3904.87 (Offizieller Build) (64-Bit) VENDOR = 0x1002 [X.Org], DEVICE= 0x67ef [AMD Radeon (TM) RX 460 Graphics (POLARIS11, DRM 3.33.0, 5.3.7-301.fc31.x86_64, LLVM 9.0.0)] ACTIVE |
i remember if i found this at first time it works so i try some older version! and yes its works with e600d2c v0.12.0 |
ok last working version is v0.13.0 breaks the rendering |
Yikes! Thanks for reporting this, and for narrowing down the exact version where it broke. I'll look through those commits for anything obvious but I'm concerned I won't be able to verify a fix if it's specific to your Linux distro or GPU drivers. |
Trying to work a hunch... In your browser do you see the flying spaghetti here? https://troika-examples.netlify.com/#bezier3d |
made a small video of the problem, looks like if the rendere only use SDF ( small size) it works on oculus go it works fine |
Dang, that busted my hunch. That video is fascinating. I can think of a few reasons that behavior could occur, but those should have also failed in 0.12.1. Will keep looking... |
To make sure we're not dealing with multiple different issues across time, could you verify the following builds all fail in the same way? |
yes all fail with the same |
Well for the moment I'm stumped on this one. Going through the v0.12.1...v0.13.0 diff, I'm not seeing a difference that should cause this behavior. The only change there that should affect text rendering is the switch to the Not sure where to go from here other than trying out some changes based on hunches and having you test them. Not being able to readily reproduce this is a pain. |
for reference here a the opengl versions |
LOL that's kind of a neat effect! 🤣 |
any idea what i could test? |
@lojjic wuha! found something interesting if i add a fog to the scene it works! |
Curiouser and curiouser. Does the "Fog" checkbox on the troika examples page also work then? |
hmm no this does not change anything |
ha yes it works if i set MeshBasicMaterial and select the Fog! |
OK thanks that maybe gives me a clue to investigate further. I'm going to try to find some time later today to push a branch with some attempts at isolated changes, and see if any of those help. |
OK here's the first attempt - let me know if there's no change, a change but still buggy, or fixed: https://5dc9dc90ab55b5000a1db32c--troika-examples.netlify.com/#text |
this change fixed it for me 85c71d6 |
That's great! We're getting somewhere. Can you try this one now please: https://5dc9e7dcea3f6e00084d01a6--troika-examples.netlify.com/#text |
ok this only works correct with MeshBasicMaterial and Fog enabled |
So it's some weird quirk with the order of execution. The only difference between those last 2 tests was what amounts to an identity assignment ( Here's a nasty hack just seeing if adding a |
ok same with the last only works with BasicMaterial and Fog on ... |
all three the same only works with BasicMaterial and Fog enabled |
Ugh. Thank you for being so patient with testing all my wild guesses. This is still making no sense to me. Testing yet another hypothesis: https://5dcaea1c9bbf6e00074b3c7a--troika-examples.netlify.com/#text |
np, this always breaks with fog on off and all Materials |
Could you please grab a few more screenshots from other examples for me when you get a moment:
These examples use similar techniques as the text fragment shader so I want to see if there's commonality in their behavior. |
Thanks for the screenshots. I was expecting at least one of them to fail in a similar way to the text, since they use the same exact utility for modifying their fragment shader. But none of them fail. So maybe it's something specific in the text glsl. I guess I'll start removing/tweaking things one by one in the text glsl and see if we can maybe narrow down the exact trigger. A few tries: |
ok all 1. 2. and 3. works with all material and with and without fog! |
😮 Amazing! OK one last thing to check and then I should have enough info for a final fix: And can you verify the Shadows checkbox works too please? |
That's actually good news! It points to a very specific conditional as causing the problem:
It looks like replacing that conditional with just So I'll just remove the conditional. I could try to reformulate it as a DEFINE or something but it's not all that useful anyway. I'll work this up into a final fix on master, have you verify that one more time, and then publish a new version and update it in the aframe component. May take a day or two though. |
…conditional discard. Also move text alpha calc into its own function.
Master build to test, when you get a chance: https://troika-examples.netlify.com/#text |
yes this works with all Materials and fog on/off! |
@arpu Thank you once again for your time and patience in helping me track down this issue. This fix has been published in 0.15.7. I have also bumped |
tested this with the aframe component and direct troika build and example on
https://troika-examples.netlify.com/#text
The text was updated successfully, but these errors were encountered: