Closed Bug 1247804 Opened 8 years ago Closed 8 years ago

WebGL graphics glitch in native OpenGL mode in Sponza by Babylon.js demo.

Categories

(Core :: Graphics: CanvasWebGL, defect)

47 Branch
x86
Windows
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: jujjyl, Assigned: jgilbert)

References

(Depends on 1 open bug)

Details

(Keywords: correctness, Whiteboard: gfx-noted)

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1247585 +++

STR:

1. Set prefs

webgl.disable-angle;true
webgl.bypass-shader-validation;true

2. Visit http://www.babylonjs.com/demos/SponzaDynamicShadows/

Observed:

Rendering is almost correct, but there are 1px wide glitch bright lines in the rendered shadows, which are not present when the above prefs are not set.

To illustrate, see the following screenshots:

- two 1px vertical stripes in the middle of the screen: https://dl.dropboxusercontent.com/u/40949268/Bugs/sponza_native_gl_1px_line_glitch_1.png

- one 1px horizontal stripe at the far end of the screen: https://dl.dropboxusercontent.com/u/40949268/Bugs/sponza_native_gl_1px_line_glitch_2.png

- a 1px diagonal stripe joining to a 1px horizontal and a vertical line at a corner: https://dl.dropboxusercontent.com/u/40949268/Bugs/sponza_native_gl_1px_line_glitch_3.png

Assuming the sample is rendering shadow maps to the faces of a cube map, this could be something related to the OpenGL seamless cube map sampling options https://www.opengl.org/registry/specs/ARB/seamless_cube_map.txt that are different in ANGLE and OpenGL modes.

Note: Marking this bug as minor for now, since it is not on the default current GL execution path due to the prefs. Jeff mentioned that reporting these would still be interesting since a potential future plan might be to run on native GL skipping ANGLE GL->D3D on Windows, where drivers would permit.
I recall that D3D does not have an option to control seamless cube map filtering, but the feature is always enabled, which would explain the difference. Would be nice to have that extension brought to WebGL.
I get these same artifacts with OSX+NV. I think your theory is correct.
This fixes it for me.
Assignee: nobody → jgilbert
Attachment #8718671 - Flags: review?(jmuizelaar)
Shouldn't we expose this as extension so web content can know whether it's on or not?
Flags: needinfo?(jgilbert)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)
> Shouldn't we expose this as extension so web content can know whether it's
> on or not?

AFAIK there's no reason to not enable it, besides backwards compat.
Cross-platform compat is technically already broken at the moment, because ANGLE and GLES3 always use seamless cubemaps.

There should be no reason a user would want non-seamless filtering.
Flags: needinfo?(jgilbert)
The idea would be to expose to web content when it's not available, so that they can choose a different path if the have a dependency on it.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #6)
> The idea would be to expose to web content when it's not available, so that
> they can choose a different path if the have a dependency on it.

I'll check with the WG at our Thursday meeting. I don't think we should block on this.
Did you find out anything?
Flags: needinfo?(jgilbert)
Attachment #8718671 - Flags: review?(jmuizelaar) → review+
(In reply to Jeff Muizelaar [:jrmuizel] from comment #8)
> Did you find out anything?

Not yet. I'll ask Thursday.
Flags: needinfo?(jgilbert)
Keywords: site-compatcorrectness
https://hg.mozilla.org/mozilla-central/rev/ab587ee9793f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: