-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error X4502: invalid input semantic 'POSITION': Legal indices are in [1,15] #12
Comments
(As a side note ), I think there is a small error in shaderc documentation. |
The best way to setup shader compiling is by using makefile. It does everything you need, you just call make TARGET=<#> to compile for target platform. See: It uses: I'm going to look -p, --profile inconsistency you mentioned. |
Fixed 391ebae |
The makefile works fine. Thanks a lot :) It is used like this in my premake.lua file: dofile "bgfx_compile_shader.lua"
function compileShaders()
bgfx_compile_shader(INPUT_SHADERS_DIR, ENV_DIR, BUILD_DIR, "dx9" )
bgfx_compile_shader(INPUT_SHADERS_DIR, ENV_DIR, BUILD_DIR, "dx11" )
bgfx_compile_shader(INPUT_SHADERS_DIR, ENV_DIR, BUILD_DIR, "nacl" )
bgfx_compile_shader(INPUT_SHADERS_DIR, ENV_DIR, BUILD_DIR, "android" )
bgfx_compile_shader(INPUT_SHADERS_DIR, ENV_DIR, BUILD_DIR, "linux" )
end However, I didn't get exactly what the dependencies are supposed to do. (files with .bin.d) (recursive call to make ?) |
bgfx shaders can include files, dependencies (it's standard makefile dependency functionality) are there to recognize changes and rebuild all affected shaders. For example if you include shaderlib.sh and use it in your shaders, once new functionality is added to shaderlib.sh all shaders that depend on it will be rebuilt. |
It make sense. While I understand that this is part of the posix standard definition of a text file, (for good legit reasons) many text editors don't do it by default. (I'm using SublimeText2) However, this is not a big deal ^^' |
I'm going to fix that. Thanks for reporting these issues, it will make it better for others who try it. :) |
You're welcome. Another (minor) issue: adding "void" in the main function of a shader return a random error.
return a random error
works fine. |
Thanks! :) Yeah bgfx shader although it looks like GLSL should not be considered 100% GLSL, because it's HLSL code when compiling for DX9 and DX11. I just used preprocessor trickery to unify all those and have single shader source code. |
Fixed cc69b20 |
Updatebgfx bug fixes
I'm struggling to make shaderc to work :(
I'm trying to compile a simple vs with only the stock shader file from bgfx but failed so far.
The shader:
where common.sh is bgfx common file (that includes bgfx_shader.sh)
My shaderc command line is: (with path simplified for readability)
I got this result:
I tried various profile but everything seems to fail so far.
I'm doing something wrong but ran of out idea to try.
Any hint ?
The text was updated successfully, but these errors were encountered: