- Изменено
spine-ts 4.1>spine-webgl>PolygonBatcher.ts>cull face bug
Took me a while to figure there was a bug with spine.ts when I was experimenting with WebGL face culling.
Correction:
if (this.cullWasEnabled) gl.enable(gl.CULL_FACE);
Polygon culling is disabled by default therefore spine.ts never allows WebGL API to polygon cull.
So face culling gets enabled at end() call but gets disabled at begin() call. My human eye perception is only seeing disabled face cull rendering. In practice, disabling face cull at begin() call is interfering with perceiving face cull rendering. :doh:
The PolygonBatcher instance is looping through many begin() and end() calls per second turning polygon cull on and off. Despite "this.cullWasEnabled" remaining "true", the time between the last end() call to the next begin() call is too brief for polygon cull to be enabled. To the human eyes, polygon cull appear to be disabled all the time.
Hi, thank you for reporting the bug. I've created a Github issue for your bug report here:
https://github.com/EsotericSoftware/spine-runtimes/issues/2227
We'll take a look and update the issue and this post.
Does your team need a sample project for this issue?
No, it's pretty clear, but thanks. I've added a comment to the issue. Sorry for the delay, a couple of our team members have been sick lately. Also, I heard that having kids was a Bad Idea.
Thank you Nate and Mario for the update. The delay is understandable. I was shocked when attempting to cull the front, back, front&back faces didn't work.