shaderc: GLSL patching.

This commit is contained in:
Branimir Karadžić 2018-04-16 18:00:24 -07:00
parent 46dcba65e5
commit dcc559536a
1 changed files with 11 additions and 0 deletions

View File

@ -2109,6 +2109,17 @@ namespace bgfx
"#define texture2DProjGrad textureProjGrad\n"
"#define textureCubeLod textureLod\n"
"#define textureCubeGrad textureGrad\n"
"#define texture3D texture\n"
);
bx::stringPrintf(code, "#define attribute in\n");
bx::stringPrintf(code, "#define varying %s\n"
, 'f' == _options.shaderType ? "in" : "out"
);
bx::stringPrintf(code
, "#define bgfxShadow2D(_sampler, _coord) vec4_splat(texture(_sampler, _coord))\n"
"#define bgfxShadow2DProj(_sampler, _coord) vec4_splat(textureProj(_sampler, _coord))\n"
);
}