foreverisbetter
Member
Hello,
I'm working on a 2D platformer but I decided for parts of the menu to be 3D. It used to be everything 2D but now I want to show a simple 3D Model in the background and also use the perspective view to get a nice parallax effect.
The Problem is: up until now, I used the following script to draw text shadow
Now this code introduces z-fighting. And I can't wrap my head around how to draw text from the same object to another depth/layer in the new layer system.
Do I have to draw the text to a surface then change it to a texture and then draw the texture to a primitive and then draw the primitive at the right z location?
What would be the best approach? How does one tackle this problem?
Thanks in advance for your advice!
I'm working on a 2D platformer but I decided for parts of the menu to be 3D. It used to be everything 2D but now I want to show a simple 3D Model in the background and also use the perspective view to get a nice parallax effect.
The Problem is: up until now, I used the following script to draw text shadow
Code:
//draw text shadow
draw_set_color(argument10);
draw_set_alpha(argument11);
draw_text_ext_transformed(xx+lengthdir_x(sh_len, sh_dir),
yy+lengthdir_y(sh_len, sh_dir), string_hash_to_newline(str),
sep, w, xscale, yscale, angle
);
//draw text
draw_set_color(prev_col);
draw_set_alpha(prev_alpha);
draw_text_ext_transformed(xx, yy, string_hash_to_newline(str), sep, w,
xscale, yscale, angle
);
Do I have to draw the text to a surface then change it to a texture and then draw the texture to a primitive and then draw the primitive at the right z location?
What would be the best approach? How does one tackle this problem?
Thanks in advance for your advice!