[Interest] Is it possible to compile a shader in runtime using qsb?

Nuno Santos nuno.santos at imaginando.pt
Sat May 11 12:12:38 CEST 2024


Laszlo,

Thanks for this amazing tip. This is exactly what we needed! ;)

The Qt Company team rocks!

Have a great weekend.

Best regards,

Nuno

> On 8 May 2024, at 16:42, Laszlo Agocs <laszlo.agocs at qt.io> wrote:
> 
> Hi,
> 
> From Qt 6.6 on you can pull in the Qt Shader Tools module into the project and try using https://doc.qt.io/qt-6/qshaderbaker.html
> 
> If this is actually suitable for your use case, cannot say without more details, because doing the heavyweight compilation and transpilation at runtime is one thing, being able to do something with the resulting QShader object is another.
> 
> For instance, when working with custom scenegraph materials, a QShader can be used instead of .qsb filenames via https://doc.qt.io/qt-6/qsgmaterialshader.html#setShader
> If however the intention would be to do something similar in a ShaderEffect declared in QML, there is no API to achieve that since its vertexShader and fragmentShader properties only consume (.qsb) file URLs.
> 
> Best regards,
> Laszlo
> 
> From: Interest <interest-bounces at qt-project.org> on behalf of Nuno Santos via Interest <interest at qt-project.org>
> Sent: Tuesday, May 7, 2024 11:28 AM
> To: interestqt-project. org <interest at qt-project.org>
> Subject: [Interest] Is it possible to compile a shader in runtime using qsb?
>  
> Hi,
> 
> I’m wondering if it is possible to run qsb to compile a shader in run time on iOS.
> 
> I’m using QProcess to call qbs in order to compile in run time but since QProcess does not exist on iOS, I wonder how can I achieve the same result?
> 
> Thanks!
> 
> Regards,
> 
> Nuno
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org <mailto:Interest at qt-project.org>
> https://lists.qt-project.org/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240511/0248652e/attachment.htm>


More information about the Interest mailing list