Hi,
I want to be able to dynamically edit a cubemap with the lat/long/cylindrical mapping configuration. This texture would be applied to a Point light as a cookie. The only other topic I can find on this is loading a texture from file and using TextureImporter to set the mapping type, but I want to create the cubemap via script. If necessary, I can accept having a Cubemap file to start with and edit that at runtime, but I haven't been able to do this during my testing.
I have tried Graphics.Blit, Graphics.CopyTexture and Graphics.ConvertTexture, but all return errors when I try and copy data from a Texture2D or RenderTexture onto a Cubemap (incompatible formats).
Cubemap has SetPixel methods but require the cube face to be passed in - I need a lat/long equirectangular mapping though as it is easier to work with angles, so I can't use these functions. I have my equirectangular image as a RenderTexture but the Point light won't accept that as a cookie. I just need to copy my RT to a cylindrical-mapped CubeMap, but I am finding this very difficult and I'm beginning to think it is impossible.
Is there any way of doing this?
Thanks,
-shwhjw
↧