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

2024-05-07 Thread Nuno Santos via Interest
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@qt-project.org
https://lists.qt-project.org/listinfo/interest


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

2024-05-08 Thread Laszlo Agocs via Interest
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  on behalf of Nuno Santos via 
Interest 
Sent: Tuesday, May 7, 2024 11:28 AM
To: interestqt-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@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


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

2024-05-11 Thread Nuno Santos via Interest
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  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  on behalf of Nuno Santos via 
> Interest 
> Sent: Tuesday, May 7, 2024 11:28 AM
> To: interestqt-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@qt-project.org <mailto:Interest@qt-project.org>
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest