OpenCL random numbers
Posted 10 January 2012 - 07:05 PM
Posted 11 January 2012 - 11:41 AM
Currently working on: the 3D engine for Tomb Raider.
Posted 11 January 2012 - 01:14 PM
Posted 11 January 2012 - 01:37 PM
If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D
Posted 11 January 2012 - 08:22 PM
Posted 12 January 2012 - 04:10 AM
Posted 12 January 2012 - 06:04 PM
I see what you mean, but what I meant to say was, if there is a way to pass a seed on every call to the kernel so that the seed is global to all the work items and workgroup, and updated everytime the random function is called? More like a GPU thread safe seed update?
Posted 12 January 2012 - 06:49 PM
Posted 13 January 2012 - 11:33 AM
It depends what you want to do, when I do my cloud simulations I use the old trick of using floating point textures and swapping buffers.
So you populate a texture with variables, run the shader on it and write the results to another texture. Then swap the textures.
You are limited in that you can only have 4 variables per pixel, so your equations have to be broken down into separate passes, but it's effective.
Posted 13 January 2012 - 04:24 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users