Perspective property makes box-shadow render incorrectly (With sw-wr enabled)
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: blendertut, Assigned: lsalzman)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
This markup:
<div class="parentt">
<div class="shadow">
<p>The shadow is broken".</p>
</div>
</div>
And this css:
.parentt{
perspective: 100rem;
}
.shadow {
width: 75%;
padding: 10px;
background-color: #fe5fe5;
transition: all 2s ease;
box-shadow: 15px 15px 40px;
transform: rotateY(75deg);
}
.shadow:hover{
transform: rotateY(180deg);
}
body {padding: 40px;}
Actual results:
Weird shadow effect, like it's rotating on the z axis instead of the Y.
Like so:
https://ibb.co/r4Qv66Q
Expected results:
Expected result is a normal shadow. Webkit has no problem with it.
This seems to be caused by the perspective property.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Web Painting' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
cc rmader, in case we want hw-wr here instead of sw-wr.
Comment 5•2 years ago
|
||
Hi blendertut,
Can you attach the content of about:support here?
Reporter | ||
Comment 6•2 years ago
|
||
Reporter | ||
Comment 7•2 years ago
|
||
Here it is. Apparently this is caused by hardware acceleration? I indeed believe I have changed some settings in the past due to crappy nvidia drivers on linux. MIght be that?
Comment 8•2 years ago
|
||
From what I understand you should be able to update to the 470 driver series (https://www.nvidia.com/Download/driverResults.aspx/191232/en-us/ - but Ubuntu should ship it) - can you try that?
![]() |
||
Comment 9•2 years ago
•
|
||
Rendering quality issue with sw-wr? Might be core webrender as well, but it looks like accelerated is rendering properly. Could you set the right Severity here Lee?
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 10•2 years ago
|
||
Clip tile shaders don't output the vertex W, so that SWGL can't detect if we're trying
to render something with perspective or not. swgl_drawSpan functions then get invoked
as if no perspective was used. In this case, we need to explicitly check to see if
there is perspective, or rather, that the W value varies along the span.
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Comment 12•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Reproducible on a 2022-10-14 Nightly build on macOS 12 using the testcase from Comment 2.
Verified as fixed on Firefox 108.0b3(build ID: 20221117185908) and Nightly 109.0a1(build ID: 20221117214129) on macOS 12, Ubuntu 22, Windows 10.
Description
•