Brenden
Member
So I am just normally drawing a textured primitive yet for some reason when two or more primitives overlap they become slightly transparent. I have not used any blending or alphas within any of the code.
I am taking a view and pasting it to a surface and then make that surface into a texture to be place onto the primitive.
Code Example:
Here is what happens when two collide
If you could help me understand what I may be doing wrong, that would be great.
EDIT:
I was messing around an it seems that sense I have a black square over each face in the room and those squares each an opacity setting to them witch some how cause the whole texture/surface to be that opacity?
I am taking a view and pasting it to a surface and then make that surface into a texture to be place onto the primitive.
Code Example:
Code:
if !surface_exists(surface5){
surface5 = surface_create(400, 400);
surface_set_target(surface5);
draw_clear(c_black);
surface_reset_target();
view_surface_id[5] = surface5;
}
var tex=0;
draw_set_colour(c_white);
tex = surface_get_texture(surface1);
draw_primitive_begin_texture(pr_trianglestrip, tex);
draw_vertex_texture(face1[| 2], face1[| 6], 0, 1);//bottom left
draw_vertex_texture(face1[| 0], face1[| 4], 0, 0);//top left
draw_vertex_texture(face1[| 3], face1[| 7], 1, 1);//bottom right
draw_vertex_texture(face1[| 1], face1[| 5], 1, 0);//top right
draw_primitive_end();
If you could help me understand what I may be doing wrong, that would be great.
EDIT:
I was messing around an it seems that sense I have a black square over each face in the room and those squares each an opacity setting to them witch some how cause the whole texture/surface to be that opacity?
Last edited: