-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent default behavior for WebGL.entity between Firefox and Chrome #38
Comments
@MartinSStewart i investigated this, seems that inconsistent behavior is because the depth buffer is disabled in I wonder what should be the result of a depth test if there is no depth buffer ? Perhaps different browsers interpret this differently |
Yeah, it seems like it's browser specific (hence why I get difference results on Chrome and Firefox). I think the solution to this would be to make sure whatever happens, it's consistent between browsers? |
I am not sure how important is to fix browser inconsistencies in the case of misconfiguration. Perhaps the documentation could be better to prevent this? The Alternatively maybe the WebGL API could be changed to prevent this. Maybe different versions of Or the implementation — if there is an entity with the depth test in the list of entities — the depth buffer is getting automatically turned on. This can only happen on the first render though. Doing this implicitly may be a bit weird. |
Maybe a phantom type could be used to prevent the misconfiguration? Adding a stencil/depth check to an entity forces it to have a specific extension record as a phantom type (i.e. |
The following code (Ellie link) will show a green rectangle on Firefox and a black rectangle on Chrome and Safari. This behavior is consistent both on Windows and Mac OS.
If you change
WebGL.entity
toWebGL.entityWith []
then all browsers will be consistent in showing a green rectangle.The text was updated successfully, but these errors were encountered: