mgsx-dev / gdx-kit

Apache License 2.0
4 stars 1 forks source link

GLSL strict compilation #1

Open mgsx-dev opened 7 years ago

mgsx-dev commented 7 years ago

NVidia drivers are very permissive compared to ATI, very often shaders works on desktop and crash on mobile for this reason.

It would be helpful to provide some tools to stricly validate shaders.

At least generalize shader compilation in order to raise exception with all compilation errors.

mgsx-dev commented 7 years ago

when shader code directive like this is present : #version 320 es compiler raise more errors than without it. For instance, implicit conversion of int to float raise an error whereas it compile well when version is omitted.

So one solution is to use version directive to ensure it will compile on Android (or any ES device)