Lance Klepp
Member
Re-Edited post to get to the point.
Gamemaker Studio 2 IDE version: v2.2.5.481
Runtime Version: v2.2.5.378
Platform: Windows
This script below, I believe interferes with ANY shader when used together(could be due to old code - minor alterations from this script: Click Here)
I've narrowed it down to this script being the cause of this compiler spam:
I've exported a project that can be downloaded through this link: Click Here
But it may not be necessary to do that as someone with a trained eye will likely suss out the cause just from the code above.
It isn't a vital part of my project and I may scrap the idea of the script completely if it's not going to work this way but if anyone can help me get shaders to work with this
it'd be appreciated.
Usually the circle drawn has another circle drawn in the centre that is subtracted out, therefore creating a ring shape. With a shader enabled, this doesn't occur.
I looked at the primitive and the gpu_blendmode and even commented these out but the issue still occurs.
Gamemaker Studio 2 IDE version: v2.2.5.481
Runtime Version: v2.2.5.378
Platform: Windows
This script below, I believe interferes with ANY shader when used together(could be due to old code - minor alterations from this script: Click Here)
Draw Circular Bar
GML:
///@desc draw_circular_bar
///@arg x 0
///@arg y 1
///@arg value 2
///@arg max 3 higher the slower and lower the faster
///@arg colour 4
///@arg radius 5
///@arg alpha 6
///@arg width 7
if (argument2 > 0) { // no point even running if there is nothing to display (also stops /0
var i, len, tx, ty, val;
var numberofsections = 15 // there is no draw_get_circle_precision() else I would use that here
var sizeofsection = numberofsections // -ve draws clockwise
val = (argument2/argument3) * numberofsections // 2=value 3=max
if (val > 1) {
circlesurface = surface_create(argument5*2,argument5*2)
if surface_exists(circlesurface){
draw_set_colour(argument4);
draw_set_alpha(argument6);
surface_set_target(circlesurface)
draw_clear_alpha(c_blue,0.7)
draw_clear_alpha(c_black,0)
draw_primitive_begin(pr_linestrip);
draw_vertex(argument5, argument5);
for(i=0; i<=val; i++) {
len = (i*sizeofsection)-45; // the 45 here is the starting angle
tx = lengthdir_x(argument5, -len);
ty = lengthdir_y(argument5, len);
draw_vertex(argument5+tx, argument5+ty);
}
draw_primitive_end();
draw_set_alpha(1);
gpu_set_blendmode(bm_subtract)
draw_set_colour(c_black)
draw_circle(argument5-1, argument5-1,argument5-argument7,false) //draws invisible circle to make ring
gpu_set_blendmode(bm_normal)
surface_reset_target()
draw_surface(circlesurface,argument0-argument5, argument1-argument5)
surface_free(circlesurface)
}
}
}
[Run] Run game
Options: Z:/Draw_faile_F90EFEAE_AB69B9D4\MainOptions.json
X://windows/Runner.exe -game "Y:/Draw_failed_due_to_invalid_input_project_6301C514_VM\Draw failed due to invalid input project.win"
Attempting to set gamepadcount to 12
DirectX11: Using hardware device
Collision Event time(microsecs)=1
Total memory used = 7571222(0x00738716) bytes
**********************************.
Entering main loop.
**********************************.
Could not generate input layout (is there a mismatch between your shader and vertex format?)
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Draw failed due to invalid input layout
Attempting to set gamepadcount to 0
Not shutting down steam as it is not initialised
X://windows/Runner.exe DONE (0)
I've exported a project that can be downloaded through this link: Click Here
But it may not be necessary to do that as someone with a trained eye will likely suss out the cause just from the code above.
It isn't a vital part of my project and I may scrap the idea of the script completely if it's not going to work this way but if anyone can help me get shaders to work with this
it'd be appreciated.
Usually the circle drawn has another circle drawn in the centre that is subtracted out, therefore creating a ring shape. With a shader enabled, this doesn't occur.
I looked at the primitive and the gpu_blendmode and even commented these out but the issue still occurs.
Last edited: