shaderc: Fixed gl_FragColor patching for raw GLSL.
This commit is contained in:
parent
6224daf907
commit
e6125ffa46
@ -2491,6 +2491,17 @@ namespace bgfx
|
|||||||
{
|
{
|
||||||
bx::stringPrintf(code, "#version %d\n", glsl_profile);
|
bx::stringPrintf(code, "#version %d\n", glsl_profile);
|
||||||
|
|
||||||
|
if (120 < glsl_profile)
|
||||||
|
{
|
||||||
|
if (!bx::findIdentifierMatch(input, "gl_FragColor").isEmpty() )
|
||||||
|
{
|
||||||
|
bx::stringPrintf(code
|
||||||
|
, "out vec4 bgfx_FragColor;\n"
|
||||||
|
"#define gl_FragColor bgfx_FragColor\n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bx::stringPrintf(code
|
bx::stringPrintf(code
|
||||||
, "#define texture2DLod textureLod\n"
|
, "#define texture2DLod textureLod\n"
|
||||||
"#define texture2DGrad textureGrad\n"
|
"#define texture2DGrad textureGrad\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user