The problem is I want to use texture1 and it's RGBA components but dependent
texturing affects only RGB components and alpha is allways the same in final image although I change volxelsRGBA[..] array where alpha is written.
In other words I don't now how to use alpha, only RGB changes

Share this post

Link to post

Share on other sites

Original post by np39223The problem is I want to use texture1 and it's RGBA components but dependenttexturing affects only RGB components

Ughh, texture shaders. Damn, how I hated those. Glad they're gone...

Anyway, the colour format of the texture unit accessed by a dependent read is unaffected by the texture shader operation. It's only the format of the previous unit that is important for the operation (in your case, the green and blue components). The result from the dependent read on unit 1 should be a full RGBA value. Of course, you still need to configure the texture environment combiners to actually use that RGBA value in a sensible way.

That said, you should really stop using texture shaders. As said above, they're dead and gone nowadays. If the extension is buggy (which wouldn't surprise me in newer drivers), it will never be fixed.

You should look into programmable shaders instead, ie. GLSL, Cg, or ASM level fragment programs (which still have their place besides high level shaders, unlike texture shaders).

0

Share this post

Link to post

Share on other sites

Guest Anonymous Poster

Guest Anonymous Poster

Thanks Yann L, why I am using texture shaders is because I'm working on hardware accelerated volume rendering and I would like widest support possible. SoI guess NV_texture_shader is supported from GForce2 till now, so majority ofNVIDIA cards support it whereas GLSL, cg and other stuff aren't supportedon older cards.

So I need basicly tex.shaders to interactivly change transferfunctions in volume rendering and in the same time require support of minimum number of extensions as possible . . I'm limited with time but maby I even add lighning effects to VR, such ass diffuse, specular, etc. So I'm not really sure how to do it - texture_shaders+register_combiners? I'm not expert in per pixel lightning stuff, so I don't know is there an alternative to my outdated approach, I'm not even sure how long mentionedextensions will be supported in new nvidia chipset.

So if there is better aproach then mine (to achieve max. compatibility +interactive TF editing and lightning) I will be glad to find out. thx...

0

Share this post

Link to post

Share on other sites

Original post by Anonymous PosterThanks Yann L, why I am using texture shaders is because I'm working on hardware accelerated volume rendering and I would like widest support possible. SoI guess NV_texture_shader is supported from GForce2 till now, so majority ofNVIDIA cards support it whereas GLSL, cg and other stuff aren't supportedon older cards.

Basic texture shaders were supported on GeForce3 on upwards, but they were extremely slow on that card. The more 'powerful' ones from GeForce4 on, but not really fast either. But as I mentioned, those extensions are really outdated, and for all practical purposes, they're dead. They won't ever be updated anymore, nor maintained. It's very well possible that future GPUs and driver revisions will entirely drop support for them, or introduce bugs that will break your code.

And as you noted, they're only supported by Nvidia, and won't work on ATI.

Quote:

Original post by Anonymous PosterSo I need basicly tex.shaders to interactivly change transferfunctions in volume rendering and in the same time require support of minimum number of extensions as possible . . I'm limited with time but maby I even add lighning effects to VR, such ass diffuse, specular, etc. So I'm not really sure how to do it - texture_shaders+register_combiners?

The best possible solution is to go with time, and use a modern form of shader programming through GLSL or Cg. Cg might be an even better option for you, since it can compile to old texture_shader and register_combiner profiles. Although this support might also be dropped in a not too distant future.

Seriously, texture shaders and register combiners are a dead end road. Save yourself the hassle, and use GLSL or fragment programs instead. They will be faster, they're vendor independent, and they're allow for much quicker development. But note that the ASM variant (ie. fragment programs) are not updated anymore, although they will still stick around for some time to come (support won't be removed from future drivers). But GLSL is definitely the way of the future.

0

Share this post

Link to post

Share on other sites

Thanx for advice Yann L. I'm already learning GLSL, I started today and i already have some result. I was too thinking that GLSL could be better but I neded something to be sure. I couldn't make decision by my self. Problem is that all matherials about hardvare Volume Rendering were refering to NV_reg_comb and ATI_frag_shaders.. That was my main mental barrier. Now I'm sure.. thanx a lot!!