AlbertTJames Posted September 25, 2016 Share Posted September 25, 2016 Hey, It seems using CACHESTRATEGY_CANVAS changes the background color of the canvas: http://babylonjs-playground.com/#1GWM8Z#0 http://babylonjs-playground.com/#1GWM8Z#1 without caching on the left: Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 26, 2016 Share Posted September 26, 2016 The thing is when you don't use CACHEDCANVAS the canvas' background color you define is blended with the Viewport's own background color. When you use the CACHEDCANVAS, the canvas' background color is drawn to a texture which is not initialized with the Viewport's background color but with a 0x00000000 value, so instead of being blended with the Viewport's background color, it's blended with nothing. That's where the difference is. Now, I don't really know how to solve this issue, because I can't really initialize the cached bitmap with the viewport's background color otherwise it will occlude 3D content that are supposed to be underneath the canvas. There should be a blending combination existing to get the same result, but I have to work more on this. For now, if you want to ensure the same result, then don't use a viewport's background color or don't use a Canvas' background color with Alpha... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.