This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:community:enobayram:text_and_shaders [2015/12/08 23:49 (8 years ago)] – [Illuminating the Text with a Light!] enobayram | en:tutorials:shaders:text_and_shaders [2020/08/31 06:01 (4 years ago)] (current) – ↷ Links adapted because of a move operation 42.156.254.115 | ||
---|---|---|---|
Line 28: | Line 28: | ||
* And a plump.png file that looks like (**Don' | * And a plump.png file that looks like (**Don' | ||
- | {{plump_with_transparency.png}} | + | {{tutorials: |
These two files are all you need to use this font in your game, copy them to somewhere your game can find them. **Important note:** '' | These two files are all you need to use this font in your game, copy them to somewhere your game can find them. **Important note:** '' | ||
Line 51: | Line 51: | ||
Here's the result: | Here's the result: | ||
- | {{text_and_shader_hello_world.png|}} | + | {{tutorials: |
[[https:// | [[https:// | ||
Line 65: | Line 65: | ||
Anyway, the result is (The [[http:// | Anyway, the result is (The [[http:// | ||
- | {{plump_with_border.png}} | + | {{tutorials: |
And this is how it looks in the game: | And this is how it looks in the game: | ||
- | {{text_and_shader_hello_world_border.png}} | + | {{tutorials: |
Nice! [[https:// | Nice! [[https:// | ||
Line 80: | Line 80: | ||
Now, take a look at the original generated font texture again: | Now, take a look at the original generated font texture again: | ||
- | {{plump_with_transparency.png}} | + | {{tutorials: |
It's a 32 bit RGBA image that just conveys the information of a 1bit image! So much wasted potential. In fact, we could just drop all the color values and fulfill the job of the font texture with just the alpha channel. Let's do that; open the original plump.png in GIMP and paint it all black (Note that I didn't bother myself with the transparency image this time since the image is visible as it is, so you can just download this image if you like): | It's a 32 bit RGBA image that just conveys the information of a 1bit image! So much wasted potential. In fact, we could just drop all the color values and fulfill the job of the font texture with just the alpha channel. Let's do that; open the original plump.png in GIMP and paint it all black (Note that I didn't bother myself with the transparency image this time since the image is visible as it is, so you can just download this image if you like): | ||
Line 111: | Line 111: | ||
And the output is exactly the same as before: | And the output is exactly the same as before: | ||
- | {{text_and_shader_hello_world.png|}} | + | {{tutorials: |
- | So, what did we gain by this? Now we have 3 color channels that we can do anything we want with!!! So we'll use the red channel to carry the border information. We'll edit plump.png the same way we did in the [[tutorials:community:enobayram: | + | So, what did we gain by this? Now we have 3 color channels that we can do anything we want with!!! So we'll use the red channel to carry the border information. We'll edit plump.png the same way we did in the [[en:tutorials:shaders: |
except that we'll be stroking with red: | except that we'll be stroking with red: | ||