I currently have my game rendering one static and one dynamic cubemap (for efficency reasons) and have access to these in my shader.
The problem I am having though is that the dynamic cubemap needs to be on top of the static one (as the static one holds the whole room) but I can’t seem to find a way to get this to work. Currently I do some blending between the two maps, which in some way works but you can still see the static cubemap through the dynamic cubemap.
How would you want to determine where the static cubemap displays in front of the dynamic cubemap? You need to create some kind of mask and then lerp between the two.
My initial thought was hoping there was a method that would allow one texture to be written/overlayed on top of another (sort of like a blending technique).
Currently I:
// Combine the cubemaps together (NOTE: This does give some problems with how the balls are sorted
// with the background
fixed3 mixedMaps = lerp( dynamicCube.rgb, staticCube.rgb, staticCube.a );
mixedMaps *= _ReflectColor;