[Interest] [Qt3D] Error: uniform variables in fragment shader do not fit in vectors

Paul Lemire paul.lemire at kdab.com
Mon Nov 26 09:48:24 CET 2018


Hi Oleg,

Do you recall which Material simple-qml uses? I would assume it's the
PhongMaterial or DiffuseSpecularMaterial. Both of these materials are
made to work with Qt3D default lights which brings in a set of uniforms
(see
http://code.qt.io/cgit/qt/qt3d.git/tree/src/extras/shaders/es2/light.inc.frag).
I would suspect this is what's triggering the linking error. The easiest
work around is probably to use your own custom Material with simpler
shaders.

I hope that helps,

Paul


On 24/11/2018 12:28, Oleg Evseev wrote:
> Hi all,
>
> Trying to run simple-cpp 3d application on ARM embedded Linux against
> Qt 5.9.5 got the error:
>
> QOpenGLShader::link: Error: uniform variables in fragment shader do
> not fit in 222 vectors.
>
> According to
> https://www.khronos.org/registry/OpenGL/specs/es/2.0/es_full_spec_2.0.pdf
>
> > Fragment shaders can access uniforms belonging to the current shader
> object. The amount  of  storage  available  for  fragment  shader 
> uniform  variables  is specified by the implementation-dependent
> constant MAX_FRAGMENT_UNIFORM_VECTORS
>
> > This value represents the number of four-element floating-point,
> integer, or boolean vectors that can be held in uniform variable
> storage for a fragment shader. A link error will be generated if an
> attempt is made to utilize more than the space available for fragment
> shader uniform variables
>
> So I wonder why simple 3d application can't fit in?
>
> Thanks in advanced for help.
>
> --
> With regards, Oleg.
>
> _______________________________________________
> Interest mailing list
> Interest at lists.qt-project.org
> https://lists.qt-project.org/listinfo/interest

-- 
Paul Lemire | paul.lemire at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel: France +33 (0)4 90 84 08 53, http://www.kdab.fr
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20181126/3ab3a3c3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4282 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20181126/3ab3a3c3/attachment.bin>


More information about the Interest mailing list