Closed Bug 1133161 Opened 10 years ago Closed 6 years ago

WebGL shadow maps no longer work

Categories

(Core :: Graphics: CanvasWebGL, defect, P3)

34 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mark, Unassigned)

References

()

Details

(Keywords: regression, Whiteboard: gfx-noted)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0 Build ID: 20150213030456 Steps to reproduce: I tested the following WebGL demo: https://dl.dropboxusercontent.com/u/40949268/emcc/bugs/ShadowMap2/ShadowMap.html It used to work before. Actual results: Current Firefox release and nightly do not display this demo properly, and the scene is completely dark (unlit) with no shadow mapping. Expected results: The scene should be lit, with the balls casting shadows on each other and on the floor.
The demo looks identical for me in Firefox31,35,38 and IE11 Can you please attach a screenshot how it looks on your system and also post the graphic section from about:support (enter as url)
Flags: needinfo?(mark)
Attached image nightly38-shadowmap.jpg
This is what it looks like in both m-r and nightly for me (attached screenshot from nightly) I made sure to try with a fresh profile, same result. Graphics section: Graphics Adapter Description AMD Radeon HD 6800 Series Adapter Drivers aticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64 Adapter RAM 1024 ClearType Parameters Gamma: 2200 Pixel Structure: R ClearType Level: 0 Enhanced Contrast: 200 Device ID 0x6738 Direct2D Enabled true DirectWrite Enabled true (6.2.9200.16492) Driver Date 11-20-2014 Driver Version 14.501.1003.0 GPU #2 Active false GPU Accelerated Windows 1/1 Direct3D 11 (OMTC) Subsys ID 174b174b Vendor ID 0x1002 WebGL Renderer Google Inc. -- ANGLE (AMD Radeon HD 6800 Series Direct3D11 vs_5_0 ps_5_0) windowLayerManagerRemote true AzureCanvasBackend direct2d 1.1 AzureContentBackend direct2d 1.1 AzureFallbackCanvasBackend cairo AzureSkiaAccelerated 0
Flags: needinfo?(mark)
FYI: graphics section in FF-release (35) with the same unlit result: Graphics Adapter Description AMD Radeon HD 6800 Series Adapter Drivers aticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64 Adapter RAM 1024 ClearType Parameters Gamma: 2200 Pixel Structure: R ClearType Level: 0 Enhanced Contrast: 200 Device ID 0x6738 Direct2D Enabled true DirectWrite Enabled true (6.2.9200.16492) Driver Date 11-20-2014 Driver Version 14.501.1003.0 GPU #2 Active false GPU Accelerated Windows 1/1 Direct3D 10 Subsys ID 174b174b Vendor ID 0x1002 WebGL Renderer Google Inc. -- ANGLE (AMD Radeon HD 6800 Series Direct3D9Ex vs_3_0 ps_3_0) windowLayerManagerRemote false AzureCanvasBackend direct2d AzureContentBackend direct2d AzureFallbackCanvasBackend cairo AzureSkiaAccelerated 0
I'm running mozregression for this, will have a regression range for you shortly. This is what it is supposed to look like.
Regression window: Got as far as we can go bisecting nightlies... Ensuring we have enough metadata to get a pushlog... Last good revision: 44ae8462d6ab (2014-03-12) First bad revision: 46041cc216fd (2014-03-13) Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=44ae8462d6ab&tochange=46041cc216fd
via local build: a6fc178ac9a1 Jeff Gilbert — Bug 981240 - Finalize null attachments back to zero. - r=kamidphish
Blocks: 981240
Status: UNCONFIRMED → NEW
Component: Untriaged → Canvas: WebGL
Ever confirmed: true
Flags: needinfo?(jgilbert)
Keywords: regression
Product: Firefox → Core
I can confirm this on OSX 10.10.2. I see the following in console: Error: WebGL: clear: incomplete framebuffer ShadowMap.js:3038 Error: WebGL: drawArrays: incomplete framebuffer ShadowMap.js:3198 Error: WebGL: No further warnings will be reported for this WebGL context (already reported 32 warnings)
Whiteboard: gfx-noted
This demo works for me. Is this bug still reproducible for anyone?
Flags: needinfo?(mark)
Summary: [regression] WebGL shadow maps no longer work → WebGL shadow maps no longer work
I can still reproduce the problem on Windows10 Nightly52.0a1 if HWA is disabled. https://hg.mozilla.org/mozilla-central/rev/fd0564234eca242b7fb753a110312679020f8059 Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 ID:20160919065232
It's better ;) Previously it would render wrong regardless of HWA state. I don't have a nightly handy at the moment but the current release version on win 7 also displays the problem with HWA disabled, renders fine with HWA enabled. Other webgl demos I've tried work fine with HWA off, seems to just be a shadow map problem.
Flags: needinfo?(mark)
I looked at bug 981240 and noticed something: Looking at the code, in WebGLFramebuffer::FinalizeAttachments() In the patch there, conditionals were removed for "FinalizeAttachment" and it's now called regardless of the attachments being defined, for depth, stencil and depth+stencil, in that order. I think this is the problem, as it'll only call it once and then consider it finalized with an early exit. I'm not entirely sure what the advantage is of this early exit, or if it'd work in all situations, but it seems to me that removing the if (x.IsDefined()) checks was incorrect there, in any case.

URL is broken now.

Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → INCOMPLETE

Re-open by Comment 13.

Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---

This new URL seems to work fine for me!
Does it still render improperly for you?

Nightly with HWA disabled seems to render this fine now. I'm gathering one of the ANGLE updates took care of it.

Flags: needinfo?(mark)

Cool, thanks!
Let me know if there's any other problematic configurations!

Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: