Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

This is due to the fact that things draw differently in 3D than traditional 2D. There could be a number of reasons the shader isn't appearing. Gamemaker doesn't supply a Z value by default to primitives (only vec2 in_Position). A couple of things you can try:

  • Use matrix_set(matrix_world, matrix_build(...)) and set the circle x/y to 0, 0 and only use the matrix to set the x, y and z values
  • Make sure the circle is rotated accordingly (using the matrix build functionality)
  • If you want the circle to just draw and not account for z values you can turn ztest/zwriteenable off
  • Draw the circle to a surface and apply the shader there. The bloom will only work on the bounds of the vertex triangles for the circle, and thus not produce the effect you want (you can see this if you also apply your bloom shader to a circle in 2D instead of to an entire surface)

If the last point is the issue, one thing to remember is that shaders only effect the graphical rendering within the vertices of a quad, so the shader can only grab pixels / extend pixels within those bounds. 

These are just a few examples of things you can test. Fauxton uses more traditional 3D techniques, and as such, requires you to draw things differently than you would in standard gamemaker. 

I highly recommend giving DragoniteSpams Gamemaker 3D tutorials a good watch through to understand some of the concepts used in fauxton at a much deeper level. :)

(+1)

the problem was not that the shader does not give its effect, but that setting the shader makes the correctly drawn circle disappear. The suggestions with matrixes did not work, but that is because the circle, as I wrote, is drawn in the right position with the right rotation already. The solution with the surface worked, but out of curiosity I checked other shapes and I am wondering about things you can see in attached screenshots. Why does only the circle behave like this under the influence of any shader?

In any case, thanks a lot.

(1 edit)

Interesting that it is only circles. It could just be the order GM renders the vertices. You can try turning off culling to see if that fixes it? Or rotate the circle around. If GM creates circles (for whatever reason) clockwise, then its probably trying to show you the 'back' of the circle instead. 

gpu_set_cullmode(cull_noculling)

Other than that though, Maybe the shader format is wrong? Idk that is really strange. haha.