| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on.
Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I362d40cc7861551b49d97120751b107d3d7f674e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As opposed to (mostly) camera space. Oops.
While somewhat hidden with point lights, the problem became apparent with
directional lights.
Now that we have proper directional lights, change the default light, that is
used when no light components are specified at all, from point to directional
since this is cheaper and provides less surprises with arbitrary scenes.
Also remove the duplicate phongalpha vertex shader in the process.
Change-Id: I295660a1400b16b69e1516672e31794312ee48d1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
| |
Change-Id: I91a6db87836c0e37af10d8de90e431240a7851e2
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unify light intensity in the phong material and shaders. The GL3 version had
1, 1, 1 whereas the other two used 1, 0, 1. The former is more sensible, so
standardize on that. We also remove the default uniform values for GL2 and 3.
The defaults are now coming from one central place in PhongMaterial.qml.
All fragment shaders need to be revamped since these are common for OpenGL 2.0
and OpenGL ES 2.0. The only way to get something that compiles with both is to
have the float/vecX precision qualifiers inline. This is in line with how
ShaderEffect items work with Qt Quick. On non-ES Qt will dynamically add the
necessary empty defines for highp etc.
Remove also comments about uniform blocks (since it is not an option for ES2) and
clean up the default values (which are coming from QML).
Change-Id: If9862b4f2faf0b877da4032dcfcd123f259aa168
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Version 120 is wrong. Everything must function with the default 100.
Set the default precision in fragment shaders.
Remove default uniform values. These will need some replacement on
the C++ side. For the time being we just ignore it.
This makes the shaders compiling at least.
Change-Id: I0072c8a2027883f531413a48f680bb002c7f8222
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
QDiffuseMapMaterial
QDiffuseSpecularMapMaterial
QNormalDiffuseMapMaterial
QNormalDiffuseAlphaMapMaterial
QNormalDiffuseSpecularMapMaterial
material-cpp is mostly inspired from materials (QML) but nicer :).
Note: there seems to be an issue with qrc and QUrl. The behavior is different
between QML and C++.
-In C++ we need to prefix with have qrc:/ and convert that to :/ (passing :/
directly returns "" when QUrl toString is called)
-From QML no prefix is needed.
-For QImage path, :/ should be used.
Change-Id: Ib56fb9546c95c2872686a46ed048a290ab4a5b6f
Task-number: QTBUG-41548
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|