Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with obj_3d_terrain
- {
- if uncovered == 1
- {
- gpu_set_alphatestenable(true);
- d3d_transform_set_identity();
- d3d_transform_add_translation(x,y,0);
- //if collision_point(other.xactual,other.yactual,self,0,0) {gpu_set_fog(1,c_blue,0,512);} //Disable fog
- if collision_point(other._x,other._y,self,0,0) {gpu_set_fog(1,c_blue,0,512);} //Disable fog
- //gpu_set_cullmode(cull_counterclockwise); d3d_model_draw(other.mod_block,x,y,0,other.wall_tex); gpu_set_cullmode(cull_noculling);
- d3d_model_draw(other.mod_terrain,0,0,0,other.tex_wall);
- draw_sprite_ext(spr_tex_tile, 0, 0, 0, 1, 1, 0, c_white, 1);
- d3d_set_fog(true, other.fog_colour, other.fog_near, other.fog_far); //Reenable fog
- gpu_set_alphatestenable(false);
- d3d_transform_set_identity();
- }
- if surface_exists(other.sur_depth)
- {
- surface_set_target(other.sur_depth);
- var blur_width = 256;
- //Weise die Uniformen Variablen zu
- var zdis = shader_get_uniform(shader_DOF_depth, "zdis");
- //Setzt den speziellen Depth Shader ein
- shader_set(shader_DOF_depth);
- shader_set_uniform_f(zdis, blur_width);
- if uncovered == 1
- {
- with other{d3d_set_projection_ortho_ext(x_2d,y_2d,z,x_2d+cos(direction*pi/180),y_2d-sin(direction*pi/180),z+tan(degtorad(zdirection)),0,0,1);}
- gpu_set_alphatestenable(true);
- d3d_transform_set_identity();
- d3d_transform_add_translation(x,y,0);
- //if collision_point(other.xactual,other.yactual,self,0,0) {gpu_set_fog(1,c_blue,0,512);} //Disable fog
- if collision_point(other._x,other._y,self,0,0) {gpu_set_fog(1,c_blue,0,512);} //Disable fog
- //gpu_set_cullmode(cull_counterclockwise); d3d_model_draw(other.mod_block,x,y,0,other.wall_tex); gpu_set_cullmode(cull_noculling);
- d3d_model_draw(other.mod_terrain,0,0,0,other.tex_wall);
- draw_sprite_ext(spr_tex_tile, 0, 0, 0, 1, 1, 0, c_white, 1);
- d3d_set_fog(true, other.fog_colour, other.fog_near, other.fog_far); //Reenable fog
- gpu_set_alphatestenable(false);
- d3d_transform_set_identity();
- }
- shader_reset();
- surface_reset_target();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement