• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion [PROPOSAL] Allow shaders to set line width and point size

P

Pixelrobin

Guest
It would be really nice if we were able to set gl_LineWidth and gl_pointSize in shaders when drawing vertex buffers with pr_line... and pr_pointlist. This could lead to several applications, especially in 3D: cheap wires and ropes, 3D particle systems, etc.
 
R

renex

Guest
3D particle systems
I use a dumb trick for this... I send in quads compressed into a point and then transform them back into quads facing the screen on the vertex shader.

I've heard you can even use textures on points... wonder how that works. Wouldn't that also require bumping the gl version? Also I've heard line rendering is dodgy.
 
P

Pixelrobin

Guest
I use a dumb trick for this... I send in quads compressed into a point and then transform them back into quads facing the screen on the vertex shader.

I've heard you can even use textures on points... wonder how that works. Wouldn't that also require bumping the gl version? Also I've heard line rendering is dodgy.
Yes, points can be textured, it's really simple. You can texture them right now in GMS2 using shaders, but you can't change the size so it's hard to tell. Line rendering can be dodgy, but useful. If it would mean a few lines of code changed in GMS2, I think it's worth adding it so users can have that flexibility with shaders.
 
Top