IMG_SIZE() works fine on declared image inputs but fails on multi-pass buffers. Many ISF shaders that call IMG_SIZE all load — but any shader that asks for the size of a pass target fails to compile with:
error C1008: undefined variable "_BufferA_imgRect"
I would expect a pass target to generate the same uniforms as an image input, since IMG_SIZE is part of the ISF spec (albeit slightly ambiguously) and doesn't distinguish between them. Those shaders that fail in Magic with this error, load and run in the Vidvox ISF Editor. The various LLMs often use IMG_SIZE for buffer passes and since buffers can be different from the input image size or the RENDERSIZE, it can be useful.
IMG_SIZE on buffers
Re: IMG_SIZE on buffers
Can you post an example that works in the ISF editor but not in Magic?
Re: IMG_SIZE on buffers
Here's my harness that tests IMG_SIZE of a buffer. In test #3 (the buffer test) it fails in Magic with "0(53) : error C1503: undefined variable "_bufTest_imgRect" but runs in the ISF editor (shows colour). On many cases I can replace IMG_SIZE with RENDERSIZE but not all.
Re: IMG_SIZE on buffers
Ok. We'll fix this for the next build.
Re: IMG_SIZE on buffers
Ok. We'll fix this for the next build.