https://bugs.kde.org/show_bug.cgi?id=393073

            Bug ID: 393073
           Summary: Perspective incorrect texture mapping
           Product: kwin
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: scene-opengl
          Assignee: kwin-bugs-n...@kde.org
          Reporter: vladz...@gmail.com
  Target Milestone: ---

Created attachment 111982
  --> https://bugs.kde.org/attachment.cgi?id=111982&action=edit
Window texture is not interpolated correctly across the trapezoid. There
shouldn't be any triangles.

Steps to reproduce:

* Apply the following patch
diff --git a/effects/magiclamp/magiclamp.cpp b/effects/magiclamp/magiclamp.cpp
index a392d4942..a95efa16c 100644
--- a/effects/magiclamp/magiclamp.cpp
+++ b/effects/magiclamp/magiclamp.cpp
@@ -91,7 +91,6 @@ void MagicLampEffect::prePaintWindow(EffectWindow* w,
WindowPrePaintData& data,
     if (mTimeLineWindows.contains(w)) {
         // We'll transform this window
         data.setTransformed();
-        data.quads = data.quads.makeGrid(40);
         w->enablePainting(EffectWindow::PAINT_DISABLED_BY_MINIMIZE);
     }

* Enable Magic lamp
* Set duration to 5000
* Minimize a window

Actual results:
Textures aren't properly mapped.

Expected results:
Textures should have been mapped something like this
https://i.stack.imgur.com/yhL62.png
(source:
https://gamedev.stackexchange.com/questions/29478/silly-question-about-perspective-correct-texture-mapping)

Please note that Magic lamp behaves weird when the grid consists only of 1
cell, but this bug report
not about that! This bug report about correct texture mapping when window quads
have been transformed.

---

Another view on the problem: https://i.stack.imgur.com/2qVr1.png
(source:
https://stackoverflow.com/questions/15242507/perspective-correct-texturing-of-trapezoid-in-opengl-es-2-0)

On the left hand side: what KWin is currently doing, on the right hand side:
what KWin should do.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to