NVParse Register Combiner problems

Well, I’ve read and reread all the paper I could find on nVidia’s website dealing with register combiners using NVParse, however I still can’t understand the syntax. I’m used to the mentality of D3D pixel shaders, so the register combiner system still seems odd to me. I think that I have a fundamental understanding of how the register combiner system works, I just don’t have a clear understanding of the syntax.

for instance,
Why does the term scale_by_two () have to be at the end of a combiner state? Why can’t I scale a specific component in a combiner state by a value (or, if I can, how?)? Why does multiplying by a const with a value greater than 1 act as if it were clamped (are consts pre-clamped?)?

All these issues are not clearly defined in the pdf files that I’ve seen, and I’m getting frustrated that I don’t have a clear paper defining the syntax that I should be using.

Any links?

GL_NV_register_combiners. read the specs and you know what you can and what you cannot do. nvparse just puts a nicer syntax around, but why something is in there the way it is, its defined by the hardware…

scale_by_two is the same as _x2 after an instruction in the pixelshaders, and values bigger one get clamped in the pixelshaders as well, at least on geforce hardware…

Right, but it is that nice syntax that I don’t understand. I’m still searching for a definition of it.

Why does the term scale_by_two () have to be at the end of a combiner state? Why can’t I scale a specific component in a combiner state by a value (or, if I can, how?)? Why does multiplying by a const with a value greater than 1 act as if it were clamped (are consts pre-clamped?)?

Because that’s how the hardware works. It’s not like D3D exposes the ability to do any of what you’re describing. It simply doesn’t exist in register-combiner hardware.

That’s fine – but where is it documented? Maybe I need to re-read the docs, but it seems to me like knowing the underlying hardware doesn’t imply knowing the syntax of a “language” that uses that hardware.

rgreene -

I know what you’re saying. There really aren’t any docs explaining nvparse syntax for register combiners (although there are for Texture Shaders, and vertex programs are identical)…I have looked.

So you have to do it the hard way. First, learn exactly what capabilities exist in the register combiners by reading available documentation. Then, if you can’t guess the syntax for what you want to do, you have to “go fish” for the command in one of the examples in nvEffectsBrowser.

I know it’s a pain in the butt, but it’s actually preferable to the pain of using OGL calls to set up and maintain register combiner code.

Let me know if you DO find any good nvparse RC documentation.

– Zeno

Zeno: Thanks for the reply. That’s kind of what I’ve been doing. I’ll just keep trudging along.

Sorry guys, I’ve become a little frustrated by the lack of docs here.

What about this one,
http://developer.nvidia.com/view.asp?IO=programmable_texture_blending

Sweet, thanks