فهرست منبع

shaderc: GLSL patching.

Branimir Karadžić 7 سال پیش
والد
کامیت
dcc559536a
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      tools/shaderc/shaderc.cpp

+ 11 - 0
tools/shaderc/shaderc.cpp

@@ -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"
 									);
 							}