How to customize the shader for text? #174
Replies: 8 comments 2 replies
-
Generally speaking, you can assign I'm not sure what "a specific svg matrix to transform the text" means, but if it's truly just a different matrix maybe you want to just assign that to the object's |
Beta Was this translation helpful? Give feedback.
-
its a 2x3 matrix that transform things in 2D, so no exactly i want to avoid using matrixWorld and stuff, my shader for example for rendering polygons, looks exactly like that, i d like text from troika to use same kind of matrices the same way. |
Beta Was this translation helpful? Give feedback.
-
At first glance I think your shader should work ok, except that instead of the input:
it will need to use the standard Three.js
(position.z will always be |
Beta Was this translation helpful? Give feedback.
-
I'm also wondering about the limits of using custom
Looks like the material derivation process isn't getting the frag shader to ingest
but that doesn't work either. Is there some shader boilerplate we need to put in so that the DerivedMaterial comes out all wired up properly? |
Beta Was this translation helpful? Give feedback.
-
@peterqliu That As for the main text color, it should just use whatever you set Outline colors I can see not working if you're trying to set them via |
Beta Was this translation helpful? Give feedback.
-
👍 I can definitely code it there, though I'm trying to hew to the API as closely as possible. Ideally the shader would populate that with whatever I originally set Broadly, I'm game to structure my |
Beta Was this translation helpful? Give feedback.
-
i noticed this same error when setting castShadow to true |
Beta Was this translation helpful? Give feedback.
-
Well me the solution was to make my own graphic library and my own text shader lol |
Beta Was this translation helpful? Give feedback.
-
Hey, i need to use a specific svg matrix to transform the text instead of working with the regular camera from threejs, how can i achieve that?
Should i override the base material first and how to not touch parts that will be used by troika?
Beta Was this translation helpful? Give feedback.
All reactions