I’m using WebGPUEngine to create the scene, when I don’t call Scene.debuglayer.show (), the scene works fine, but when I open it, the console prints texture size is 10000x8000, Does Inspector still use texture features?
I’m not sure I understand. Do you have a repro for us to look at?
Error that occurs when debugLayer.show() is called after whenReadyAsync or Scene.isReady. The scene works fine when I don’t call debugLayer.show(). My scene has a lot of assets, but it doesn’t have more than 8k textures.
Are you sure you don’t upscale a post process by passing something bigger than 1 for the “options” parameter? Given the debug name of the post process, the WidthxHeight of the texture is 14731x7366 for some reasons…
A repro in the Playground would be the best way to look for the problem, though.
I’ll debug it again and upload a playground if needed.
Does the size of the depth buffer relate to the mesh number of objects in the scene? When I opened the debugger I suspected that the depth buffer map was over 8k in my scene.
The size of the depth buffer is the size of the screen, but it takes into account the value you pass to setHardwareScalingLevel
! So, if you pass 0.5, the size is doubled.
See:
In this PG, the size of the depth buffer is quadrupled because I passed 0.25.
thanks your answer, I use engine. SetHardwareScalingLevel (1) the inspector can show, what is default value with HardwareScalingLevel? Because I haven’t changed this value before.
Default value is 1. If you didn’t change it, then I don’t understand why the size of the texture is so high… What is the result of engine.getRenderWidth()
and engine.getRenderHeight()
in the console of the browser? These are the values that are used to create the depth texture by the depth renderer.
height = 1352, width = 2702, Is it because of the sampling rate of MSAA? I set it to 4.
No, the MSAA setting does not impact the texture size.
At this point, you should try to set a breakpoint in the Rendering/depthRenderer
file, in the constructor, around the line this._depthMap = new RenderTargetTexture
and see what values are passed for width/height…