Build (130 - 131) Performance dropped by 50% due to new texture processing with DOUBLESIDE material

Good evening, I decided today to do a performance test between build versions 129 and 131.
At the stage of loading the scene, it slows down because the recording is in progress and the browser without a cache, all data is loaded from scratch. I have uploaded one of the locations this is a forest for 50 mobs. In my engine, it is provided that all objects that do not enter the camera are automatically removed from the scene, and when the camera is directed at them, they again enter the scene, there are models of grass and trees with DOUBLE SIDED material on the scene, since the sprite grass does not look beautiful, while the grass is broken in parts, and if it does not fall into the camera, then the system of course removes it from the stage. However, in version 131, if you rotate the camera at the desired angle, then the game simply starts to slow down because too much detail gets into processing.
After the introduction to the THEEJS library, texture processing has been multiplied many times, this has been discussed in this thread. Editor performance has dropped too much - version 130 - #10 by arpu

And so the test showed that after the full load of all the models in version 129, the number of frames is on average 55 - 60, but in version 131 there is a maximum of 32 frames and there are drops to 15. Now imagine for a second that this is a mobile phone and not a PC.


1 Like

Sorry, but this is a duplicate. You have to decide whether Editor performance has dropped too much - version 130 should be the topic for this issue or this one.

It’s no good style to create multiple topics just to raise the priority for an issue.

Also, this topic needs to be discussed at GitHub, not at the forum. Fortunately, you also commented here: WebGLRenderer: Render transparent doublesided in two calls by mrdoob · Pull Request #21967 · mrdoob/three.js · GitHub

1 Like

I’m sorry, I was just tired yesterday, I didn’t think about it. I collected all the information to the heap and showed that what they did starting with version 130 worsened all performance, and very much, I hope that a way out of this situation will be found.


In general, for those who are looking for a solution, while the developers will decide how best to make it manageable, here is my solution, you can invent the property of the object yourself, or even comment out or remove the code, everyone will decide for himself how it is more convenient for him to do it.

String 19259 i add object.userData.hasOwnProperty(‘twoCalls’)

That is, you just need to come up with some kind of property and, due to it, activate this processing option if someone needs it.

1 Like

Hi @KiborgMaster, does this works in lastest threejs version (139)?. I really don’t like that performance is getting lower and lower as new versions come out in favor of quality. I’m still on version 129 but I don’t want to stay out of date forever either.

The code in WebGLRenderer change a bit so the above screenshot is not up to date. However, the solution of @KiborgMaster in order to skip the code path for double sided transparent material still works if the additional check is added here:

Good evening, yes, in order to achieve maximum performance, I removed double processing by cutting it out of the code.