From e45a8e05d1cbcaf8f20ad6989a2c0c25e2e2dc5e Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Wed, 1 Jun 2016 12:00:17 +0100 Subject: Fix planets-qml inner planets shading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * The shadow light was using the undefined matrix property which resulted in a matrix full of NaN's in the shader. This caused everything to be fully in shadows for the inner planets. Fixed to use the correct viewMatrix property. * After fixing the above, it became clear that the inner planets were being shadowed with lots of artifacts. The only shadow casters are the planets Saturn and Uranus and their rings. In this configuration it makes no sense to try to shadow the other planets as this leads to bad shadow acne due to the huge distances involved vs the limited precision of the shadow depth texture. Fixed these artifacts by only applying shadows to Saturn and Uranus. Task-number: QTBUG-53751 Change-Id: I96ab08117c9988c40f083a1345ec7f7d1b0f7ce6 Reviewed-by: Miikka Heikkinen Reviewed-by: Tomi Korpipää Reviewed-by: Paul Lemire --- examples/qt3d/planets-qml/planets-qml.qrc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples/qt3d/planets-qml/planets-qml.qrc') diff --git a/examples/qt3d/planets-qml/planets-qml.qrc b/examples/qt3d/planets-qml/planets-qml.qrc index 4b6bd433d..ebac0bcd5 100644 --- a/examples/qt3d/planets-qml/planets-qml.qrc +++ b/examples/qt3d/planets-qml/planets-qml.qrc @@ -35,5 +35,7 @@ shaders/es2/planetDB.vert shaders/es2/planetDS.frag shaders/es2/planetDSB.frag + shaders/gl3/planetDShadow.frag + shaders/gl3/planetDShadow.vert -- cgit v1.2.3