-
Notifications
You must be signed in to change notification settings - Fork 68
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
vp20compiler: Implement shader format that bundles shader-defined constants #578
Comments
Not sure if this should be changed in vp20compiler itself (which is a pretty bare bones assembler + it implements a specific bit of the hardware, and uses known syntax from nvidia / GL spec). Most of the time, I ran my shaders through a C preprocessor anyway (to have macros in the shaders); others skip preprocessing because they use Cg (which I hate with a passion, because it's a binary blob). I don't see an issue with parsing the input shader (with vp20compiler So, historically, lack of variables and constant locations is a shortcoming of the nxdk Makefile or proprietary Cg; not of vp20compiler (which is mostly an assembler, so you define the environment). There are related tasks like relocation of constants to fit multiple vertex programs into the GPU at once, which also deserve some tooling. I don't think vp20compiler has to handle all of this itself, either. So, to me, extracting constants feels more like a pre- or post-processing step (unless we plan to turn vp20compiler into a full compiler with constant folding etc.). Extracting metadata is similar to pre-processing with C / Cg which are also separate tools. Putting a wrapper or separate tool in nxdk-
|
Currently, when a shader is generated using constant uploads, the user has to examine the shader output and manually set constants generated by the compilation.
A workflow to use the shader constants automatically when loading a shader will ease development
The text was updated successfully, but these errors were encountered: