support gl_Layer input to fragment stage (merge from https://github.com/Unity-Technologies/HLSLcc/pull/23)

This commit is contained in:
Antti Tapaninen 2018-12-23 10:15:58 -08:00
parent 16e38ceeb8
commit af5de73bdb

View File

@ -1992,6 +1992,11 @@ void ToGLSL::TranslateDeclaration(const Declaration* psDecl)
bcatcstr(GetEarlyMain(psContext), "vec4 hlslcc_FragCoord = vec4(gl_FragCoord.xyz, 1.0/gl_FragCoord.w);\n");
break;
}
case NAME_RENDER_TARGET_ARRAY_INDEX:
{
AddBuiltinInput(psDecl, "gl_Layer");
break;
}
default:
ASSERT(0);
break;