• 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!

3D d3d_set_culling causing trouble with surfaces

sp202

Member
I'm using a shader to draw a 3D model and using d3d_set_culling to cull backward facing triangles. This works fine usually:
upload_2018-7-5_12-46-10.png
but if I try to draw the 3D model onto a surface, d3d_set_culling actually ends up culling the forward facing triangles:
upload_2018-7-5_12-48-44.png
Any way to fix this?
 
I

icuurd12b42

Guest
weird. it's like drawing as though one of the axis is inverted.

try, as the first transform
d3d_transform_add_scaling(1,1,-1);
then your rotations... d3d_transform_add_rotationx/y/z....
then your translations... d3d_transform_add_translation...
then d3d_model_draw...
assuming the back to front of the head is layered on the zaxis.

you can also as mentioned, use another projection to fix this. if the aspect ratio is negative, that would also flip the vertices around
 
Top