Quantcast
Channel: GLSL / Shaders - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 212

How can I render a grid using shaders?

$
0
0

I realise this is a very vague question.

I have a grid composed of thousands of rectangles, and their colour is updated each frame. This makes the sketch call the fill() + rect() function around 40,000 times each frame.

Is there any way I could feed the info for each cell in the grid (cellX, cellY, cellR, cellG, cellB) to a shader and have that render the grid?

I know very little about GLSL, and I apologise if this is a stupid question but I'm desperate to get my CPU usage down.

Thanks in advance for your help,

Nico


Viewing all articles
Browse latest Browse all 212

Trending Articles