Hi, some of my (pixel)shaders outputs to several render targets.
I had an issue for which I thought it was for a specific RT format, changing this format to a more basic (RGBA8) format causes some other issues.
Using glGetFragDataLocation to validate my shaders, it seems that on all my (pixel)shaders using MRT, at most one output is present in the compiled shader ...
I'm using this syntax
layout(location = 0) out vec4 PS_OUTPUT_fBlend1;
layout(location = 1) out vec4 PS_OUTPUT_fBlend2;
layout(location = 2) out uint PS_OUTPUT_uiFlag;
which works fine on all other platforms I'm developing for.
taking a look at the Adreno SDK, the quickref shows this syntax:
out vec4 gl_FragColor[3];
which enables MRT, but all of the same format.
so ...
Am I wrong or the (multiple) layout(location = n) out type nameN; syntax doesn't work ?
Does Adreno OpenGL ES 3.0 implementation allows MRT with different formats (for example, mixing a vec4 and an uint) ?
Hi, I spend the whole day normalizing the way I declare PS outputs in my wrapper
as long as there are more than 1 RT, even if they are of the same type, glGetFragDataLocation returns 0 for the first RT (correct), and returns -1 for all the others.
(Nexus 4 / Android 5.0 / Driver 95)
it seems (to me) that MRT rendering is correct, the only incorrect thing is the result value of glGetFragDataLocation in this case.