[Sidefx-houdini-list] GLSL Function library
malexander at sidefx.com
Mon Dec 14 14:40:46 EST 2009
The files in gpgpu are heavily macro'ed to overcome a lot of hardware
limitations, and also so that they can run in Nvidia's Cg (Sony Cell
workstation) and OpenGL's GLSL. Most are texture lookups in pixel
coords, not UVs. You can consider code there to be like pseudocode,
rather than GLSL (the framework around it is also built on the fly, like
uniforms and other functions).
All the noise functions in that directory require a source texture with
random values in it, otherwise it won't be terribly noisy.
And yeah, most implementations of GLSL's noise() function that I've seen
return a rather un-noisy constant 0.
The link Ed posted is a good quality noise method, though it still
requires a source texture to operate (though it specifies that texture
for you). You might be able to embed one in a SHOP asset, and reference
it from an invisible texture map parameter on the node.
François Duchesneau wrote:
> I've manage to compile it and it gives a result. However it doesn't look
> really like the noise.
> From what I understand it uses a permutation texture and a lookup
> texture but they don't provide it. I think I can figure it out from the
> array of pseudo-random number in the C code. For now I'll concentrate to
> better understand GLSL altogether but I'm pretty confident it'll work.
More information about the Sidefx-houdini-list