• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!
  • 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