engine icon indicating copy to clipboard operation
engine copied to clipboard

WebGL Error when using Cubemap Renderer script v1.55

Open MAG-AdrianMeredith opened this issue 3 years ago • 6 comments

Description

We're using the "cubemap renderer" script to create a cubemap for reflection probes, upgrading from 1.53 > 1.55 they no longer work and I'm seeing WebGL errors in the log Screenshot 2022-07-25 at 14 31 03 image

MAG-AdrianMeredith avatar Jul 25 '22 13:07 MAG-AdrianMeredith

We have two engine examples which use the cubemap renderer and both seem to work ok: https://playcanvas.github.io/#/graphics/box-reflection https://playcanvas.github.io/#/graphics/render-cubemap

slimbuck avatar Jul 25 '22 14:07 slimbuck

I still get the error but weirdly enough if I change the resolution property from 256 > 128 it works? that makes no sense... image

MAG-AdrianMeredith avatar Jul 25 '22 14:07 MAG-AdrianMeredith

it seems the more I increase the resolution the darker the reflection gets until it can't be seen at all... very strange

MAG-AdrianMeredith avatar Jul 25 '22 15:07 MAG-AdrianMeredith

I've managed to find a work around, it appears to be related it mipmapping. Changing the cubemap-renderer cubeMap texture from minFilter: FILTER_LINEAR_MIPMAP_LINEAR -> minFilter: FILTER_LINEAR makes it fully resolve again. weird

MAG-AdrianMeredith avatar Jul 25 '22 15:07 MAG-AdrianMeredith

This means the cubemap's mipmaps aren't being generated/updated for some reason.

slimbuck avatar Jul 25 '22 16:07 slimbuck

@MAG-AdrianMeredith - would you be able to create some minimal repro project? I'd be keen to have a look. Alternatively, you could also enabled some tracing to see what happens under the hood .. this could show us if mipmaps get generated perhaps. Something like this:

pc.Tracing.set(pc.TRACEID_RENDER_FRAME, true);
pc.Tracing.set(pc.TRACEID_RENDER_PASS, true);
pc.Tracing.set(pc.TRACEID_RENDER_PASS_DETAIL, true);

mvaligursky avatar Aug 01 '22 11:08 mvaligursky

@MAG-AdrianMeredith This issue has not been updated in some time. I just wanted to check if this is still an issue and whether you had a response for @mvaligursky. Thanks! 😄

willeastcott avatar Nov 14 '22 00:11 willeastcott

Closing this due to lack of activity. Please reopen it if this issue persists, and provide further details.

mvaligursky avatar Feb 21 '23 14:02 mvaligursky