On my 3 Macs there is an issue getting the depth texture on Chrome and Firefox, while Safari is OK. ( Mac details the same as in this thread)
The issue is seen in this engine example which displays the depth texture bottom right:
https://playcanvas.github.io/#/graphics/post-effects
Chrome and Firefox:
Safari is OK.
If I set chrome://flags/#use-angle to Metal rather than the default OpenGL then the depth texture is displayed correctly.
Hi @Kulodo133,
I gave it a quick try on a Macbook Pro (mac OS 12.3), on Chrome, depth texture seems to be displayed.
It runs on the default OpenGL (ANGLE) graphics API.
@mvaligursky any idea?
Hi @Leonidas thanks for checking. My own test project shows the same issue ie OK in Safari but not in Chrome, (unless I set angle to use metal). In case it helps here is a diff of the Spector.js logs from my project for Chrome/OpenGL(Left) and Chrome/Metal(Right).
Itās so odd that my 3 macs have these issues but you and the playcanvas team canāt reproduce. If the Playcanvas team need a mac to repro the issue then I happen to live close by to their office.
1 Like
Created a ticket on the engine repo so we donāt lose this: Depth texture is not working correctly on some Macs Ā· Issue #4266 Ā· playcanvas/engine Ā· GitHub
Wondering if itās related to the anti alias issue you mentioned before?
Hi @yaustar
It looks like multiple issues with support for the specific specs of the 3 Macs I have.
- anti-aliasing issues
- reading the depth texture
I may be over analysing but when you say ādonāt loseā does this mean that you are not going to actively investigate the issue and wait for more issues to be reported? Iām not complaining - just want to know if you have the capacity to investigate
While these issue are frustrating for me as a developer there must be a lot of end users in the world with the same spec Macs as me that could be affected by these issues. Could your team get hold of a mac with the same specs for testing?
In my test project that shows the WebGL error I have disabled the anti-alias and this stops the WebGL lost error.
This then enables me to see the depth texture issue.
I added the following that I copied from the engine post-effect example to show the depthTexture
if (this.entity.script.bokeh.enabled) {
this.app.drawDepthTexture(0.7, -0.7, 0.5, 0.5);
}
Donāt lose as in not leaving it to memory about all the relevant issues, information and project examples. It also means that anybody else having the same issue can add more information on this.
It also allows us to track this within our teams workflows.
At the moment, we donāt have a ways of reproducing the issue with getting hold of that spec of Mac (similar to this issue we had with particle effects and Galaxy devices Rendering Issue with Samsung Exynos CPU on Android 12 Ā· Issue #3967 Ā· playcanvas/engine Ā· GitHub)
Ideally, we would want to verify a repro on same or similar hardware before committing to buying/finding a Mac to ensure itās the hardware. Honestly, not sure how we are going to do that in practise.
Iāve tried running Chrome on non hardware accelerated mode on my Mac and couldnāt repro the issue. Canāt work out a way to disable the discrete graphics card unfortunately to test against Intel
Can you test your Mac against three.js example too to see if itās an issue just with PlayCanvas: three.js webgl - postprocessing - Screen Space Ambient Occlusion
If you have a Macbook (laptop) and you run it on battery, it will automatically revert to the integrated GPU on these conditions:
- In OS Batter settings you have the āAutomatic switch GPU to conserve energyā to true
- In your PlayCanvas project you have power preference set to Default.
My 3 Macs that display issues are:
iMac: AMD RadeonPro 580,
iMac: AMD RadeonPro 570X
MacBookPro: Intel(R) HD Graphics 630
We have updated the engine examples to use the latest version of the engine. Can you give it another try please? We donāt expect it change but just want to rule out as many variables here
No change Iām afraid. Fail on Chrome/Firefox. OK on Safari
Ok, we are working with our IT department to see if thereās a laptop with Intel 630 that we can try to use to repro the issue
1 Like
Some more info.
The 2 failing iMacs are reporting 1 Graphics card
iMac 2017: AMD RadeonPro 580,
iMac 2019: AMD RadeonPro 570X
The MacBookPro 2017: is reporting two.
If I repeatedly hit reload on webglreport this sometimes it reports Radeon Pro 560 and sometimes Intel 630.
If I also repeatedly reload the engine example then twice in approx 100 reloads the depthMap was actually displayed. I canāt tell if itās anything to do with flipping between gpus or whether its just successful once in a while.
1 Like
Some interesting news:
On my iMac (Radeon Pro 580 8 GB ):
I updated Chrome to the latest and the issues still exists:
Chrome: Version 102.0.5005.61 (Official Build) (x86_64) (previous: 101.0.4951.64)
I updated Chome Canary to the latest and the depth Map is seen in the engine example.
Chrome Canary: Version 104.0.5083.0 (Official Build) canary (x86_64) (previous 103.0.5060.0 )
Hopefully that will filter through to the stable releases.
I couldnāt find a release note for canary. I had a peek at the commits for this canary release. I guess the answer will be in there somewhere, or one of the previous releases since I last updated canary.
Firefox still doesnāt work though
1 Like
Thatās great news. It doesnāt sound like an issue I had in 2017 with my 2011 iMac where one day, a graphical issue just disappeared/fixed.
1 Like
It would interesting to know what the three.js is doing differently to playcanvas to allow current Chrome to work on my Macs, and what has changed in Chrome Canary between 103.0.5060.0 and 104.0.5083.0) to allow the engine example to show the depthMap, and whether that analysis would explain why Firefox isnāt showing the depthMap.