As a precursor to any further Quick 3D porting effort (
QTBUG-78679, QTBUG-78136, QTBUG-78135), create a single application demo to serve as a basic proof of concept. It is pointless to pursue any bigger feature work before this is in place.
- Have a test application with one or two untextured primitive object. Only the default material must be used.
- Start with unlit, then complement the scene with first one, later two, lights (directional or point). (so the cg lighting path in shaders is exercised - but use no light probes yet)
- The View must use under- or overlay mode.
- No other features should be used, in order to minimize the code paths hit in the shader generator and the renderer.
- Have also some simple Qt Quick content under/over the 3D objects.
The test application is now ready:
The goal is to demonstrate this application running on top of QRhi, in combination with Qt Quick also running on its QRhi code path.
The Quick3D work is done in https://git.qt.io/laagocs/greyhoun3d
This is a fork of qtquick3d/5.15
- First, the shader generator - and the affected shader snippets - have to be hacked to produce Vulkan-compatible GLSL. The plan here is outlined in the comment for
QTBUG-78136, and this involves changes to the generator as well, due to the need to manage shader resources slightly differently.
The offline shader generation outlined in
QTBUG-78135 is not part of this exercise. We will probably link directly to qtshadertools and do shader processing at run time.
- Second, the code paths in the renderer that are touched by this test scene should be ported to QRhi.
All changes should ideally be opt-in via an environment variable, so we can run the application both with and without the hacks. QSG_RHI can serve this need just fine because we also need to get Qt Quick to use QRhi, so no need to invent a new one.