Any idea why shadowcasting doesn't work with gpu_set_ztestenable(true); even if i set gpu_set_ztestenable(false); before drawing lighting?
i was able to get lights working by setting it to false and then back to true after.. but the shadowcaster side of the lighting system doesn't like that and refuses to cast shadows.
I might have to do without shadowcasters 😭
At least I was able to get lights working with the shader grass I'm using
If you are able to update the asset to include shadowcasters that work when gpu_set_ztestenable(true) is set, that'd be great.
I tried getting the shader grass I'm using (TouchGrass) to work without gpu_set_ztestenable(true); but it was always invisible, everything i tried.
I think I'm gonna have to give up trying and settle for what I was able to get working, lights + grass.
EDIT: I GOT SHADOWCASTERS WORKING WITH THE SHADER BASED GRASS..
BUT NOW I HAVE A DEPTHMASK ISSUE... I TRIED FIXING IT BY SETTING A DEPTHMASK FOR THE PLAYER'S MESH TO BE MASKED WITH THE SPRITE, BUT NO DEPTHMASK (AS FAR AS I CAN TELL, CUS SHADOWS STILL OVERLAP MY PLAYER)

ANY IDEAS HOW TO FIX IT?
I DON'T KNOW WHY THE PLAYER DEPTHMASK I SET ISN'T WORKING,
I REALLY THOUGHT THAT WOULD SOLVE IT :/
EDIT 2: Got it working (Had to set depth of player mesh, i was setting layer without setting depth before) but now i have an issue with depthmasks, cus my players bounce around with zheight minused from player y position and theres no offsetting parameter for glr_mesh_set_depth_mask()... i might try to add it.. (i hope it's not too much work cus I had to redraw playersprites to a seperate surface and use those for depthmasks, left and right cus there's no xscale parameter for depth masks either.)
here's the depthmask working (standing still, jumping leaves the depthmask at ground height :/ )
EDIT 3 Got image_xscale working, though had to edit the depth mask shader and add a uniform int for jumping with fake z. done and tested now it's working :)













