• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

HTML5 3D Drawing Incorrectly in HTML5 Export

protosteel

Member
Hi all - I'm having an issue where a 3D model is drawn with many gaps when testing my game with the HTML5 target. Here is how it should look:

ezgif-3-2cdc33040d21.gif

And here is how it looks:

ezgif-3-9f8c6fa218b4.gif

It is worth noting that this is drawn using compatibility scripts, since I imported this project from GMS 1.4. However: it works fine in GMS2's Windows target, just not in HTML5. The colors are provided by a shader, but the gaps still appear when using a passthrough shader. Here is the code I use to draw it (obviously some variables etc. are set prior to this code):
GML:
surface_set_target(surface)
draw_clear_alpha(c_white,0)
d3d_start()
    d3d_set_projection_ortho(0,0,room_width,room_height,0)
    //title
    logorotation=min(1800,ease_out_cubic(gametimer,0,1800,300))+sin(gametimer/30)*30
    d3d_transform_add_rotation_x(logorotation)
    d3d_transform_add_rotation_y((mouse_x/room_width)*30-15)
    scale=min((room_width-50)/245,min(3.7,ease_inout_cubic(gametimer,0,3.7,300)))
    d3d_transform_add_scaling(scale,scale,scale)
    d3d_transform_add_translation(hmid,vmid+ease_out_back(min(300,gametimer),-600,400,300),0)
    shader_set(shNormals)
    d3d_model_draw(oCont.models[|1],0,0,0,-1)
    shader_reset()
    d3d_transform_set_identity()
d3d_end()
surface_reset_target()
draw_surface(surface,0,0)
Hopefully someone can point me in the right direction. Thanks!
 
Top