Page 1 of 1

Blend SkyBox Cubemaps

Posted: Sun Jul 08, 2018 8:06 pm
by Happenstance
I'd like to modify the SkyBox class to blend between two (or more) cubemaps depending on time of day. I've hacked up ScatterSky to do this (have it fading between a day & night cubemap in the shader right now) but it feels like overkill for what I need. ScatterSky does a lot of work simulating light scattering, ambient colors, sun corona, etc. and also has a weird dome shape that doesn't match up well against the horizon.

SkyBox and ScatterSky use cubemaps differently and I don't have a good enough grasp of T3D's rendering system to know where to start. SkyBox uses a BaseMatInstance to hold the cubemap material and calls setupPass() whereas ScatterSky uses CubemapData and calls GFX->setCubeTexture().

Has anyone done anything like this before?