[SailfishDevel] ShaderEffect QML element

Luca Donaggio donaggio at gmail.com
Thu Apr 10 14:30:02 UTC 2014


Thanks a lot David!

I'm pretty new to GLSL as well, I reached my conclusion with
trial-and-error (basically commenting out each and every line of code in my
fragment shader until I found the offending one) and I'm sure I tried your
solution at least once, but to no avail.

Oh well, now it works, so .... ;-)



On Thu, Apr 10, 2014 at 2:14 PM, David Greaves <david.greaves at jolla.com>wrote:

> caveat:  I'm pretty new to GLSL
>
>
> For me:
>   vec2(-0.75, -0.5)
> is fine.
>
> Note that integers like:
>  vec2(-0.75, 1)
> fail.
>
> I will be putting the glsl validation and optimiser tool into mer-tools
> 'soon'.
> (Sooner now I know other people are playing with it)
>
> David
>
>
> On 10/04/14 12:50, Luca Donaggio wrote:
> > I replied myself:
> >
> > the problem was with this syntax in my fragment shader code:
> >
> > vec2(-0.75f, -0.5f)
> >
> > it's legal inside the emulator but *not on real device*.
> >
> > Of course, all it takes to make it work is using float() constructor:
> >
> > vec2(float(-0.75), float(-0.5))
> >
> > Hope it could help someone else.
> >
> >
> >
> > On Thu, Apr 10, 2014 at 12:05 PM, Luca Donaggio <donaggio at gmail.com
> > <mailto:donaggio at gmail.com>> wrote:
> >
> >     Hi,
> >
> >     Is ShaderEffect QML element supposed to work on device (I'm on
> 1.0.4.20)?
> >
> >     I'm always getting this error (content of log property):
> >
> >     QOpenGLShader::compile(Fragment): failed
> >
> >     *** Problematic Fragment shader source code ***
> >
> >     [W] QOpenGLShaderPrivate::compile:326 - #ifndef
> GL_FRAGMENT_PRECISION_HIGH
> >
> >     #define highp mediump
> >
> >     #endif
> >
> >
> >     [... my shader code ...]
> >
> >
> >     ***
> >
> >     QQuickCustomMaterialShader: Shader compilation failed:
> >
> >     [W] QQuickCustomMaterialShader::compile:285 - "failed"
> >
> >     *** Fragment shader ***
> >
> >     failed
> >
> >
> >
> >     It works just fine on emulator though.
> >
> >     Are there some (known) differencies from the GLSL code "understood"
> by the
> >     emulator and a real device?
> >
> >     Thanks,
> >
> >     --
> >     Luca Donaggio
> >
> >
> >
> >
> > --
> > Luca Donaggio
> >
> >
> > _______________________________________________
> > SailfishOS.org Devel mailing list
> >
>
> _______________________________________________
> SailfishOS.org Devel mailing list
>



-- 
Luca Donaggio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140410/45a2e944/attachment.html>


More information about the Devel mailing list