Can I set GL_NUM_GENERAL_COMBINERS_NV to 0?
It might look stupid. But what I am trying to do is
“texture0 - texture1”, and the reason why I decided to use register-combiners is that the numeric range of combiner computations is [-1, 1].
Since the computation can be done in the final combiner stage, do I have to use any general combiner stage at all?
Yes, I just did a test and that seems to work. Just omit the RGB and alpha sections altogether, as such:
!!RC1.0
out.rgb=tex0;
out.a=tex0.a;
Of course you’ll need to fill in the function you want. This works, but whether or not it’s kosher–I dunno. I asked a question in the other forum about register combiners and no one has replied. People here seem very selective about whom they answer; the person who asks why Direct3D is more popular than OpenGL or any other question done to death gets 80 replies, the 14 year old who says “hi I don’t know any programming lol but I wanna make a game like quake but better gfx with my friends ;D who can help us lol” gets 100, and yet most of the questions I’ve ever asked (including those under other names while I was in class) have gone unanswered.
but your idea of subtracting will not work, because teh final combiners is ab + (1-a)c + d, and all clamped to range 0,1. so its essencially the same as using simple multitexture for doing this.
Originally posted by davepermen:
[b]0 general combiners works. i’ve used this yet.
but your idea of subtracting will not work, because teh final combiners is ab + (1-a)c + d, and all clamped to range 0,1. so its essencially the same as using simple multitexture for doing this.[/b]
How about the speed? Which one works faster, register_combiner, multitexturing or something else?
And kon is absolutely correct about the error/specs. Something like this is automatically inserted by nvparse if you don’t use a general combiner stage.