i.e. you have 16 cores, you make 16 clones, and insert them on the material and initing them, (being sure to clean up after)
Layer shader will then work as expected, off the bat, as long as you use the thread index to reference from your list of shader clones.
you also have to make sure you project your coordinate according to the texture tag. it wont do that for you.
p is always assumed to be a UV coordinate projected, as per the tex tag. you send p as a world coordinate with vd and if the shader needs that, that is where it would look. think of it from the perspective of a shader. where will it get a world position from? if you write a shader, and you need a world position for a hit, you look in vd for that. if vd is null, or the info has not been filled, how would it know where p is?
I found in most cases sampling a channel from a material rather than a specific shader, works best, and is less problematic.
@m_magalhaes said in DrawHUDText returns a white box instead of a text?:
I came across this problem today.
#define TAG_IMPLEMENTS_DRAW_FUNCTION (1 <<
note : you can add this flag to R21 builds, and your tags then display as expected in 22.
z settings have no effect on text.
in 21, text is drawn behind poly objects.
in 22 text is drawn in front of obejcts.
IMO, this is a bit of a mess. the new draw flag should be the exact opposite to what it is, to keep compatibility.
small differences, make a big difference when your already bending over backwards trying not to have to rebuild everything yet again, for 22.
make sure the bitmap shader is not set to MIP mapping, then it works fine.