Hello!
I tried to build the PBR sample on Android and got some errors on shaders compilation.
For example: some float variables are declared with suffix ‘f’. But this one is used only in GLSL 3.x, e.g. OpenGL ES 3.x.
Another error was found in global variables declarations in PBRLitSolid shader:
#if defined(NORMALMAP) || defined(IBL)
varying vec4 vTexCoord;
varying vec4 vTangent;
#else
varying vec2 vTexCoord;
#endif
The IBL doesn’t defined for VS shader for some techniqe (PBRDiffAlpha for example), so we have a conflict of vTexCoord type. I’ve added the IBLVS define for the VS shader in the technique and changed shader code:
#if defined(NORMALMAP) || defined(IBL) || defined(IBLVS)
varying vec4 vTexCoord;
varying vec4 vTangent;
#else
varying vec2 vTexCoord;
#endif
After all, PBR sample began to launch. But now I have another problems:
- The zone’s texture is black.
- Only lights are reflected on metalic surfaces.
- There aren’t any reflections on the wall mirror.
I haven’t got any ideas, what I have to do for correction this errors.
Can somebody help me?