im trying to get a RichTextLabel to type a buncha strings but with some words using BBcode to turn them a certain color, but what i really want is to make a custom effect that applies one of the Shaders i made to a specific word(s). is this possible? ive considered remaking my shader effect from scratch as its own custom effect but i believe the effect is far too complex to break down to fit into func _process_custom_fx():, at least without considerable loss in quality. and i appreciate the easy configurability of a shader script/material as to a custom effect script. my end goal is just to be able to write "[shader_effect]word i want shaded[/shader_effect]" and get the desired outcome. the shader effect specifically is that of an irradiated, violent hologram effect. i guess my end goal is to have a single key word have this shader effect and i believe this is the best way to do it, but im completely open to alternatives, if any. im on Godot 4.4.1.stable, any help would be appreciated.
does BBcode/RichTextEffect support Shaders?
HexedSorcerer I don't think this is possible.
but how can we get textual highlights in label or any other text node? Im curious if this is related?
- Edited
HexedSorcerer an irradiated, violent hologram effect
You might be able to accomplish this with RichTextEffect, using script rather than a custom shader.
https://docs.godotengine.org/en/4.4/classes/class_richtexteffect.html
DaveTheCoder
rich text effect lacks the complexity i require.
i ended up going with a different route when i couldnt make this work. i made 3 RichTextlabels, the regular one, and the other two with my shader effects as materials. all three rich text labels have the same text, but a script with a for loop checks for words i want shaded, and in the regular script, makes the to-be-shaded word transparent, meanwhile in the shaded richtextlabel every word EXCEPT the word i want shaded transparent, so spacing matches. the resulting effect fits my end goal perfectly.
HexedSorcerer release the code pls
- Edited
my script is rather complex, i wrote it to do things like type title intros or computer terminal text, and so it has a lot of configurability to it. so it might not be what youre looking for, but if you want to look through it to see if it can help then by all means. but if you just want to get words in a richtextlabel, just use a "for word in words" loop. i have on in my script that i use in func apply_glitch_effects(): to give a word with a corrupted effect.
i couldnt fit a video demonstration on how to actually use my script into this forum post, but if you have any more questions on how to use my terminal typer hmu on discord; @hexedsorcerer, im in the godot help discord and godot cafe servers as well.
HexedSorcerer i dont have discord, but you can upload videos on https://streamable.com/ for free, you need to have account, you can just use google or some other from their choices.
Thanks!