Do you know "Texture Shaders"? If not, don't worry as probably very few Virtools users know about it (if any at all). Though it's a Virtools "feature" since 3.x, I discovered them just recently, too. So, what is it? The docs say:
A texture shader uses a compiled high-level shader language (HLSL) function to fill each texel of each of its mipmap level. It is commonly used to generate procedural 2D or volumetric texture such as wood, noise, gradients or precomputed lookup tables. Annotations on the texture parameter declaration allow you to specify how the texture must be created. It can be used to load a new texture from a resource, create a new texture that will be used locally by the shader, select an existing texture or fill an existing texture.
GPU Shader code to create texture content …. does it ring? Create procedural texture content faster due GPU power! Maybe you know "farbrausch" and their products for procedural content, like werkkzeugTE for texture generation. So this could help in having smaller footprints for webplayer content or faster procedural level generation (i.e. height maps) or creating floating-point texture-content at run-time (currently my intention).
But the title of this article doesn't sound positive, so where is the problem? Well, it's a "at-compilation-time" only feature. Currently there's no way to (re-)trigger it at runtime. In addition to that it does not consider manual parameters, so parameters have to be hard-coded and after each change you need to compile the shader.
At leasts that's how it seems to be so far – I might overlook something.
Imagine Virtools would have created a GUI for creating Shader code like ShaderFX…. do you see what kind of ideas I got when I discovered it this in the docs?
Looked into it recently when I was fiddling with volumetric textures. I can tell you, filling a 512×512×512 texture is not done quick… not even on a GPU 😉
I think I once had like 450 textures … took ages to load them up into the GPU memory.
If you saved that DDS, how big was the file?
The texture was created by vsl and then filled by a shader texture function. It took couple of minutes to do the initialisation. In the end it was all in vain, because virtools can't render to volumetric RT's. Today I learned that that is a directx 10 / Cg 2.0 feature. There's a great looking sample of it in the nVidia OpenGL 10 SDK Its really cool, you can play with all those *next*gen* features like geometry shaders, WITHOUT HAVING TO INSTALL VISTA 😀