diff --git a/examples/06-bump/fs_bump.sc b/examples/06-bump/fs_bump.sc index 9350190b..a27ed1b0 100644 --- a/examples/06-bump/fs_bump.sc +++ b/examples/06-bump/fs_bump.sc @@ -1,4 +1,4 @@ -$input v_wpos, v_view, v_normal, v_tangent, v_bitangent, v_texcoord0 +$input v_wpos, v_view, v_normal, v_tangent, v_bitangent, v_texcoord0 // in... /* * Copyright 2011-2013 Branimir Karadzic. All rights reserved. diff --git a/examples/runtime/shaders/dx11/fs_bump.bin b/examples/runtime/shaders/dx11/fs_bump.bin index f36c95ac..31dade09 100644 Binary files a/examples/runtime/shaders/dx11/fs_bump.bin and b/examples/runtime/shaders/dx11/fs_bump.bin differ diff --git a/examples/runtime/shaders/dx11/fs_hdr_bright.bin b/examples/runtime/shaders/dx11/fs_hdr_bright.bin index 24714cda..a3df051a 100644 Binary files a/examples/runtime/shaders/dx11/fs_hdr_bright.bin and b/examples/runtime/shaders/dx11/fs_hdr_bright.bin differ diff --git a/examples/runtime/shaders/dx11/fs_hdr_lum.bin b/examples/runtime/shaders/dx11/fs_hdr_lum.bin index e39c32ea..d9c9a405 100644 Binary files a/examples/runtime/shaders/dx11/fs_hdr_lum.bin and b/examples/runtime/shaders/dx11/fs_hdr_lum.bin differ diff --git a/examples/runtime/shaders/dx11/fs_hdr_lumavg.bin b/examples/runtime/shaders/dx11/fs_hdr_lumavg.bin index f1cce53b..58f385cf 100644 Binary files a/examples/runtime/shaders/dx11/fs_hdr_lumavg.bin and b/examples/runtime/shaders/dx11/fs_hdr_lumavg.bin differ diff --git a/examples/runtime/shaders/dx11/fs_hdr_mesh.bin b/examples/runtime/shaders/dx11/fs_hdr_mesh.bin index 8a20e673..862697ee 100644 Binary files a/examples/runtime/shaders/dx11/fs_hdr_mesh.bin and b/examples/runtime/shaders/dx11/fs_hdr_mesh.bin differ diff --git a/examples/runtime/shaders/dx11/fs_hdr_skybox.bin b/examples/runtime/shaders/dx11/fs_hdr_skybox.bin index e58410e6..8520ea96 100644 Binary files a/examples/runtime/shaders/dx11/fs_hdr_skybox.bin and b/examples/runtime/shaders/dx11/fs_hdr_skybox.bin differ diff --git a/examples/runtime/shaders/dx11/fs_hdr_tonemap.bin b/examples/runtime/shaders/dx11/fs_hdr_tonemap.bin index 2b96b70b..b3ed79a5 100644 Binary files a/examples/runtime/shaders/dx11/fs_hdr_tonemap.bin and b/examples/runtime/shaders/dx11/fs_hdr_tonemap.bin differ diff --git a/examples/runtime/shaders/dx11/fs_mesh.bin b/examples/runtime/shaders/dx11/fs_mesh.bin index 2fd6d8b2..8b520700 100644 Binary files a/examples/runtime/shaders/dx11/fs_mesh.bin and b/examples/runtime/shaders/dx11/fs_mesh.bin differ diff --git a/examples/runtime/shaders/dx11/fs_raymarching.bin b/examples/runtime/shaders/dx11/fs_raymarching.bin index d9a96b21..5609a160 100644 Binary files a/examples/runtime/shaders/dx11/fs_raymarching.bin and b/examples/runtime/shaders/dx11/fs_raymarching.bin differ diff --git a/examples/runtime/shaders/dx11/vs_bump.bin b/examples/runtime/shaders/dx11/vs_bump.bin index 508915ad..98bd4598 100644 Binary files a/examples/runtime/shaders/dx11/vs_bump.bin and b/examples/runtime/shaders/dx11/vs_bump.bin differ diff --git a/examples/runtime/shaders/dx11/vs_callback.bin b/examples/runtime/shaders/dx11/vs_callback.bin index bfd4dec0..3444cf47 100644 Binary files a/examples/runtime/shaders/dx11/vs_callback.bin and b/examples/runtime/shaders/dx11/vs_callback.bin differ diff --git a/examples/runtime/shaders/dx11/vs_cubes.bin b/examples/runtime/shaders/dx11/vs_cubes.bin index e269d2db..84ca4b95 100644 Binary files a/examples/runtime/shaders/dx11/vs_cubes.bin and b/examples/runtime/shaders/dx11/vs_cubes.bin differ diff --git a/examples/runtime/shaders/dx11/vs_hdr_blur.bin b/examples/runtime/shaders/dx11/vs_hdr_blur.bin index 580cfca4..00c403ce 100644 Binary files a/examples/runtime/shaders/dx11/vs_hdr_blur.bin and b/examples/runtime/shaders/dx11/vs_hdr_blur.bin differ diff --git a/examples/runtime/shaders/dx11/vs_hdr_bright.bin b/examples/runtime/shaders/dx11/vs_hdr_bright.bin index fb2fbc49..cd4354ec 100644 Binary files a/examples/runtime/shaders/dx11/vs_hdr_bright.bin and b/examples/runtime/shaders/dx11/vs_hdr_bright.bin differ diff --git a/examples/runtime/shaders/dx11/vs_hdr_lum.bin b/examples/runtime/shaders/dx11/vs_hdr_lum.bin index fb2fbc49..cd4354ec 100644 Binary files a/examples/runtime/shaders/dx11/vs_hdr_lum.bin and b/examples/runtime/shaders/dx11/vs_hdr_lum.bin differ diff --git a/examples/runtime/shaders/dx11/vs_hdr_lumavg.bin b/examples/runtime/shaders/dx11/vs_hdr_lumavg.bin index fb2fbc49..cd4354ec 100644 Binary files a/examples/runtime/shaders/dx11/vs_hdr_lumavg.bin and b/examples/runtime/shaders/dx11/vs_hdr_lumavg.bin differ diff --git a/examples/runtime/shaders/dx11/vs_hdr_mesh.bin b/examples/runtime/shaders/dx11/vs_hdr_mesh.bin index 55702efe..af210be2 100644 Binary files a/examples/runtime/shaders/dx11/vs_hdr_mesh.bin and b/examples/runtime/shaders/dx11/vs_hdr_mesh.bin differ diff --git a/examples/runtime/shaders/dx11/vs_hdr_skybox.bin b/examples/runtime/shaders/dx11/vs_hdr_skybox.bin index fb2fbc49..cd4354ec 100644 Binary files a/examples/runtime/shaders/dx11/vs_hdr_skybox.bin and b/examples/runtime/shaders/dx11/vs_hdr_skybox.bin differ diff --git a/examples/runtime/shaders/dx11/vs_hdr_tonemap.bin b/examples/runtime/shaders/dx11/vs_hdr_tonemap.bin index a8fb726f..b98c3089 100644 Binary files a/examples/runtime/shaders/dx11/vs_hdr_tonemap.bin and b/examples/runtime/shaders/dx11/vs_hdr_tonemap.bin differ diff --git a/examples/runtime/shaders/dx11/vs_instancing.bin b/examples/runtime/shaders/dx11/vs_instancing.bin index 08417497..94ec0387 100644 Binary files a/examples/runtime/shaders/dx11/vs_instancing.bin and b/examples/runtime/shaders/dx11/vs_instancing.bin differ diff --git a/examples/runtime/shaders/dx11/vs_mesh.bin b/examples/runtime/shaders/dx11/vs_mesh.bin index 603137d5..b4f4f06b 100644 Binary files a/examples/runtime/shaders/dx11/vs_mesh.bin and b/examples/runtime/shaders/dx11/vs_mesh.bin differ diff --git a/examples/runtime/shaders/dx11/vs_metaballs.bin b/examples/runtime/shaders/dx11/vs_metaballs.bin index a7bc4e21..fcf56c06 100644 Binary files a/examples/runtime/shaders/dx11/vs_metaballs.bin and b/examples/runtime/shaders/dx11/vs_metaballs.bin differ diff --git a/examples/runtime/shaders/dx11/vs_raymarching.bin b/examples/runtime/shaders/dx11/vs_raymarching.bin index 45b791d9..dcf30c32 100644 Binary files a/examples/runtime/shaders/dx11/vs_raymarching.bin and b/examples/runtime/shaders/dx11/vs_raymarching.bin differ diff --git a/examples/runtime/shaders/dx11/vs_update.bin b/examples/runtime/shaders/dx11/vs_update.bin index b1143905..16c7317f 100644 Binary files a/examples/runtime/shaders/dx11/vs_update.bin and b/examples/runtime/shaders/dx11/vs_update.bin differ diff --git a/examples/runtime/shaders/dx9/vs_callback.bin b/examples/runtime/shaders/dx9/vs_callback.bin index e1f17d62..52890547 100644 Binary files a/examples/runtime/shaders/dx9/vs_callback.bin and b/examples/runtime/shaders/dx9/vs_callback.bin differ diff --git a/examples/runtime/shaders/dx9/vs_metaballs.bin b/examples/runtime/shaders/dx9/vs_metaballs.bin index 1869a6ec..88700f1e 100644 Binary files a/examples/runtime/shaders/dx9/vs_metaballs.bin and b/examples/runtime/shaders/dx9/vs_metaballs.bin differ diff --git a/examples/runtime/shaders/gles/vs_callback.bin b/examples/runtime/shaders/gles/vs_callback.bin index bde672e8..9e1ab1c2 100644 Binary files a/examples/runtime/shaders/gles/vs_callback.bin and b/examples/runtime/shaders/gles/vs_callback.bin differ diff --git a/examples/runtime/shaders/gles/vs_metaballs.bin b/examples/runtime/shaders/gles/vs_metaballs.bin index 79e18eac..32b26a6a 100644 Binary files a/examples/runtime/shaders/gles/vs_metaballs.bin and b/examples/runtime/shaders/gles/vs_metaballs.bin differ diff --git a/examples/runtime/shaders/glsl/vs_callback.bin b/examples/runtime/shaders/glsl/vs_callback.bin index e74ba4b9..d6c318d8 100644 Binary files a/examples/runtime/shaders/glsl/vs_callback.bin and b/examples/runtime/shaders/glsl/vs_callback.bin differ diff --git a/examples/runtime/shaders/glsl/vs_metaballs.bin b/examples/runtime/shaders/glsl/vs_metaballs.bin index d35ac4e2..d0b26b7d 100644 Binary files a/examples/runtime/shaders/glsl/vs_metaballs.bin and b/examples/runtime/shaders/glsl/vs_metaballs.bin differ diff --git a/tools/bin/shaderc.exe b/tools/bin/shaderc.exe index e033cd7c..774927cc 100644 Binary files a/tools/bin/shaderc.exe and b/tools/bin/shaderc.exe differ diff --git a/tools/shaderc/shaderc.cpp b/tools/shaderc/shaderc.cpp index 4a833586..33328a16 100644 --- a/tools/shaderc/shaderc.cpp +++ b/tools/shaderc/shaderc.cpp @@ -1213,7 +1213,7 @@ uint32_t parseInOut(InOut& _inout, const char* _str, const char* _eol) _str = bx::strws(delim + 1); } } - while (delim < _eol && NULL != delim); + while (delim < _eol && _str < _eol && NULL != delim); std::sort(_inout.begin(), _inout.end() ); @@ -1533,11 +1533,15 @@ int main(int _argc, const char* _argv[]) if (0 == strncmp(str, "input", 5) ) { str += 5; + const char* comment = strstr(str, "//"); + eol = NULL != comment && comment < eol ? comment : eol; inputHash = parseInOut(shaderInputs, str, eol); } else if (0 == strncmp(str, "output", 6) ) { str += 6; + const char* comment = strstr(str, "//"); + eol = NULL != comment && comment < eol ? comment : eol; outputHash = parseInOut(shaderOutputs, str, eol); } }