@brecht just posted

  • Open Shading Language: Patrick worked on GPU support, a patch will be submitted soon. OSL itself supports only CPU and OptiX currently, but oneAPI support is also under development, and hopefully more GPU backends will follow.

…and now besides looking forward to OSL GPU support I have a question:

If I have huge textures (like the Blue Marble NASA textures, 21600x10800px) and render them with Cycles non-OSL no matter if CPU or GPU, they of course take up lots of RAM. In this case @1,4GB for a single texture of this size, but of course they add up quickly if you use more of them.
If I use e.g. maketx to convert them to tiled / mipmapped tx-tiffs or exrs they take the same amount of RAM.

BUT: If I switch to CPU with OSL they all of a sudden render instantly with only ~150MB per texture.
OSL seems to use the mipmaps and therefore uses a much smaller resolution I guess?

So now my question: If OSL on GPU gets implemented, can I expect similar improvements in texture RAM usage?

EDIT: Seconds after posting this I found the ticket on Phabricator and sadly:

textures are limited since OIIO cannot be used on the GPU, so they are piped through the SVM system instead when on the GPU (no tiles or fancy interpolation/blurring/…) and tracing rays from OSL is not implemented for OptiX.

So I guess no improvement to memory usage can be expected.

1 Like

Yes, OSL is using OpenImageIO’s tiled mip map cache for all textures that are referenced as files (as opposed to being packed into a blend file).


Very nice! I wondered if the GPU version of OSL would also use the mipmaps but apparently in the current implementation it doesn’t.
Do you know if this “superpower” of OIIO can also be transferred to GPU?

I mean, even better would be to have your infamous Texture Cache™ to be available for GPU :wink: