-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Text component broken at master (src/shaders/sdf.js msdf.js) #5325
Comments
1.4.2 seems to be working https://aframe.io/aframe/examples/test/text/ Maybe something related to THREE updates? PRs always welcome |
Yeah, 1.4.2 is ok. Trying to fix master right now. |
Just to let you know, there is also this PR related to the text component that update the three-bmfont-text dependency #5312 maybe it would be fixed there? If the error is not related to this package, please ignore my comment. |
Yeah. to my knowledge that PR covers bounding box calculation. This issue looks like a shader compilation problem. Would be worth to bisect commits from 1.4.2 to current master to see when it broke. Can use the build links in the commits. |
seems i've found how to fix sdf/msdf shaders but something other goes wrong. testing. will try to made pull request when done |
Seems that this change in Three.js is the cause: mrdoob/three.js#26101 @nightgryphon You're change looks good. I'd just completely remove the |
I've just tried to keep the original functionality... Sorry for off topic but right now i have trouble building aframe from repo. The resulting file is a few kb smaller than github one and VR part is broken. I'm doing:
|
To build FWIW, For local testing you don't need to generate builds. can do |
It did but generated files have broken VR while ok at regular "flat" display. The world is randomly rotates around. 🤔 Prebuilt files from repo are ok so it seems i have trouble with my local tools or something. I have apache running so npm run dist is fine |
do |
Unrelated but just merged the text component fixes described above |
Updated according to @mrxz recommendtions and added PR. Though still unable to build by myself :( Has reinstalled and updated node/npm to latest but still getting broken builds which are about 2.5k smaller than official build. Seems to miss some piece or use wrong package while no errors during build. Some difference i've found is at |
@dmarcos plaese can you share |
OHHH. it is not my build broken. All official builds starting from Jul3 also have this bug. Including example |
PR #5328 |
Description:
https://glitch.com/edit/#!/lavish-amethyst-girl?path=index.html%3A9%3A14
Console error
src/shaders/sdf.js
andmsdf.js
define #version string within shader program BUT super-threesrc/renderers/webgl/WebGLProgram.js
functionWebGLProgram
automatically adds prefix before defined shader program string.WebGLProgram
can add version string ifmaterial.glslVersion
set but it is not the case for text component material.Material used in text component has to be fixed. Version string has to be removed from sdf/msdf shaders and glslVersion parameter has to be added to material.
The text was updated successfully, but these errors were encountered: