<div dir="ltr"><div><div>Thanks a lot David!<br><br></div>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.<br>
<br></div>Oh well, now it works, so .... ;-)<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 2:14 PM, David Greaves <span dir="ltr"><<a href="mailto:david.greaves@jolla.com" target="_blank">david.greaves@jolla.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">caveat: I'm pretty new to GLSL<br>
<br>
<br>
For me:<br>
vec2(-0.75, -0.5)<br>
is fine.<br>
<br>
Note that integers like:<br>
vec2(-0.75, 1)<br>
fail.<br>
<br>
I will be putting the glsl validation and optimiser tool into mer-tools 'soon'.<br>
(Sooner now I know other people are playing with it)<br>
<br>
David<br>
<div class=""><br>
<br>
On 10/04/14 12:50, Luca Donaggio wrote:<br>
> I replied myself:<br>
><br>
> the problem was with this syntax in my fragment shader code:<br>
><br>
> vec2(-0.75f, -0.5f)<br>
><br>
> it's legal inside the emulator but *not on real device*.<br>
><br>
> Of course, all it takes to make it work is using float() constructor:<br>
><br>
> vec2(float(-0.75), float(-0.5))<br>
><br>
> Hope it could help someone else.<br>
><br>
><br>
><br>
> On Thu, Apr 10, 2014 at 12:05 PM, Luca Donaggio <<a href="mailto:donaggio@gmail.com">donaggio@gmail.com</a><br>
</div><div class="">> <mailto:<a href="mailto:donaggio@gmail.com">donaggio@gmail.com</a>>> wrote:<br>
><br>
> Hi,<br>
><br>
> Is ShaderEffect QML element supposed to work on device (I'm on 1.0.4.20)?<br>
><br>
> I'm always getting this error (content of log property):<br>
><br>
> QOpenGLShader::compile(Fragment): failed<br>
><br>
> *** Problematic Fragment shader source code ***<br>
><br>
> [W] QOpenGLShaderPrivate::compile:326 - #ifndef GL_FRAGMENT_PRECISION_HIGH<br>
><br>
> #define highp mediump<br>
><br>
> #endif<br>
><br>
><br>
> [... my shader code ...]<br>
><br>
><br>
> ***<br>
><br>
> QQuickCustomMaterialShader: Shader compilation failed:<br>
><br>
> [W] QQuickCustomMaterialShader::compile:285 - "failed"<br>
><br>
> *** Fragment shader ***<br>
><br>
> failed<br>
><br>
><br>
><br>
> It works just fine on emulator though.<br>
><br>
> Are there some (known) differencies from the GLSL code "understood" by the<br>
> emulator and a real device?<br>
><br>
> Thanks,<br>
><br>
> --<br>
> Luca Donaggio<br>
><br>
><br>
><br>
><br>
> --<br>
> Luca Donaggio<br>
><br>
><br>
</div>> _______________________________________________<br>
> SailfishOS.org Devel mailing list<br>
><br>
<br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
</blockquote></div><br><br clear="all"><br>-- <br>Luca Donaggio
</div>