Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

IE zOffset / polygonOffset issue

$
0
0

It seems that IE doesn't reset the polygon offset correctly. I created a playground to demonstrate the issue:
http://www.babylonjs-playground.com/#25N9HL
The red plane in the PG has a zOffset. For some reason the offset is also applied to the knot under IE (see attached images).

I was able to workaround this issue by modifying this code:
https://github.com/BabylonJS/Babylon.js/blob/master/src/States/babylon.depthCullingState.ts#L173
I added "gl.polygonOffset(0, 0);" before "gl.disable(gl.POLYGON_OFFSET_FILL);" like this:
 

// zOffset
if (this._isZOffsetDirty) {
	if (this.zOffset) {
		gl.enable(gl.POLYGON_OFFSET_FILL);
		gl.polygonOffset(this.zOffset, 0);
	}
	else {
		gl.polygonOffset(0, 0);
		gl.disable(gl.POLYGON_OFFSET_FILL);
	}
	this._isZOffsetDirty = false;
}

How should we fix that issue? Is there a better place to add this workaround?
I'm not sure if its a general IE bug. I tested it only on two systems.

IE.JPG

Chrome.JPG


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>