Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. with obj_3d_terrain
  2. {
  3. if uncovered == 1
  4. {
  5. gpu_set_alphatestenable(true);
  6. d3d_transform_set_identity();
  7. d3d_transform_add_translation(x,y,0);
  8. //if collision_point(other.xactual,other.yactual,self,0,0) {gpu_set_fog(1,c_blue,0,512);} //Disable fog
  9. if collision_point(other._x,other._y,self,0,0) {gpu_set_fog(1,c_blue,0,512);} //Disable fog
  10. //gpu_set_cullmode(cull_counterclockwise); d3d_model_draw(other.mod_block,x,y,0,other.wall_tex); gpu_set_cullmode(cull_noculling);
  11. d3d_model_draw(other.mod_terrain,0,0,0,other.tex_wall);
  12. draw_sprite_ext(spr_tex_tile, 0, 0, 0, 1, 1, 0, c_white, 1);
  13. d3d_set_fog(true, other.fog_colour, other.fog_near, other.fog_far); //Reenable fog
  14. gpu_set_alphatestenable(false);
  15. d3d_transform_set_identity();
  16. }
  17. if surface_exists(other.sur_depth)
  18. {
  19. surface_set_target(other.sur_depth);
  20. var blur_width = 256;
  21. //Weise die Uniformen Variablen zu
  22. var zdis = shader_get_uniform(shader_DOF_depth, "zdis");
  23. //Setzt den speziellen Depth Shader ein
  24. shader_set(shader_DOF_depth);
  25. shader_set_uniform_f(zdis, blur_width);
  26. if uncovered == 1
  27. {
  28. 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);}
  29. gpu_set_alphatestenable(true);
  30. d3d_transform_set_identity();
  31. d3d_transform_add_translation(x,y,0);
  32. //if collision_point(other.xactual,other.yactual,self,0,0) {gpu_set_fog(1,c_blue,0,512);} //Disable fog
  33. if collision_point(other._x,other._y,self,0,0) {gpu_set_fog(1,c_blue,0,512);} //Disable fog
  34. //gpu_set_cullmode(cull_counterclockwise); d3d_model_draw(other.mod_block,x,y,0,other.wall_tex); gpu_set_cullmode(cull_noculling);
  35. d3d_model_draw(other.mod_terrain,0,0,0,other.tex_wall);
  36. draw_sprite_ext(spr_tex_tile, 0, 0, 0, 1, 1, 0, c_white, 1);
  37. d3d_set_fog(true, other.fog_colour, other.fog_near, other.fog_far); //Reenable fog
  38. gpu_set_alphatestenable(false);
  39. d3d_transform_set_identity();
  40. }
  41. shader_reset();
  42. surface_reset_target();
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement