I would love to have a float2 containing a texture’s mipmap0-dimensions. But I also rather not want to expose a shader property to achieve that.
DX11 Texture Objects provide the means to do that: Texture2D.GetDimensions()
But - well, the docs are pretty rare on that - how would I implement such a call in my fragment shader? Has anybody already done that successfully?
If I declared a texture/sampler pair via
UNITY_DECLARE_TEX2D(name), how would I be able to access the corresponding Texture Object / call GetDimensions on it?
Thanks a lot in advance,