GPU optimization question: pre-computed or procedural?

Posted by Jay on Game Development See other posts from Game Development or by Jay
Published on 2012-11-07T15:37:49Z Indexed on 2012/11/07 17:19 UTC
Read the original article Hit count: 184

Filed under:
|

Good morning, I'm learning shader program and need some general direction.

I want to add noise to my laser beam (like this). Which is the best way to handle it?

I could pre-compute an image and pass it to the shader. I could then use the image to change the opacity and easily animate the smoke by changing the offset of the texture lookup.

I could also generate noise in the shader and do the same thing the texture was used for.

Is it generally better to avoid I/O to the graphics card or the opposite?

Thanks!

© Game Development or respective owner

Related posts about shaders

Related posts about optimization