Text X Shader
Moderator: Moderators
Text X Shader
Since RenderText doesn't pass the automated UV mapping coordinates to its Material, there's no way to get this data into a Shader ( unless you pass it yourself explicitly ). Could this be fixed somehow?
K
I haven't thought about this. When using RenderText (I'm assuming with an imported texture font, not the built-in system font) it does not send texture coordinates, instead it modifies the texture matrix to translate the UV coords to the correct position on the font texture.
So try writing a shader that uses the texture matrix. I found an example here:
http://www.lighthouse3d.com/opengl/glsl ... hp?texture
So try writing a shader that uses the texture matrix. I found an example here:
http://www.lighthouse3d.com/opengl/glsl ... hp?texture
- jph_wacheski
- Posts: 1005
- Joined: Sat Feb 16, 2008 8:10 pm
- Location: Canada
- Contact:
Sure,
It's nothing special .. just a "typewriter" effect*. Attached is a test build and two screenshots of how it's supposed to look in case anything goes wrong
*You could also do this without a Shader by pushing letters outside of the screen depending on CharI, but you wouldn't for example be able to fade in the text as it appears.
K
It's nothing special .. just a "typewriter" effect*. Attached is a test build and two screenshots of how it's supposed to look in case anything goes wrong
*You could also do this without a Shader by pushing letters outside of the screen depending on CharI, but you wouldn't for example be able to fade in the text as it appears.
K
- Attachments
-
- Text.jpg (24.3 KiB) Viewed 5072 times
-
- Text.zip
- (44.89 KiB) Downloaded 463 times