Alpha with EX9 effect

Hi everybody!

Can anybody tell me how to change the transparency using an EX9 effect? I don´t get it done!

thx

hi
2 solution:

  1. without code : you can use the node set alpha connect to a color input of the effect
  2. in the pixel shader code before return color
    write color.a = 0.5;
    you can add a input pins at the beginning of the file , like
    float alpha = 1 ;
    and in the pixel shader code color.a = alpha;

Hi again

I haven´t jet tried the solution with the code, but set alpha is not working with the gourard effect with me. Here is a little patch showing that set alpha is working fine with the quad but not with gourard. Do you know…?

Thx a lot

SetAlpha (Color)EX9_effect.v4p (9.5 kB)

yes, during the shading calculation in the vertex shder its necessary to set alpha to 1 (see in line 64). sanchs 2. solution is is the way, see in the attached file, it has an input pin to set the alpha. just drag and drop the .fx file into your patch and replace with the Gouraud.

GouraudAlpha.fx (5.3 kB)

Once again it´s me!

I have inserted your Gourard Alpha as you have posted it in my patch. And I am bright enough to find the additional pin for alpha. I attached a Box(EX9.Geometry) and an IO Box to the new alpha pin. Am I right so far? When yes something ´s wrong, because shifting through from 0 to 1 brings no changes. What do I have to do?

thx again
(sorry for beeing so bothering)

I have experienced that changing the pin `Technique´ from gourard to TFixedFunction makes it possible to change the (transparency) alpha, or better to make the effekt visible in the renderer. But then the objekts look a kind of flat. Is there a way to get both (depth and transparency), or is it a rude world we live in? :)

cheers

hi
the effect works for me , i don t understand why that doesn t work for you !
what kind of graphic card have you ?
you use a blend node with your effect?

Hi

I do have a Ge Force4 440 Go 64 MB. I do not use a blend node. Shifting the alpha node brings no results nor attaching set alpha.

you should use a Blend (EX9.RenderState) with setting “blend” and dont forget to enable the depth buffer pin on the renderer … and to see 3d-perspective (the depth) connect a Camera (Transform Softimage) to the renderer …

try this one, its for pixelshader 1.4 cards:

GouraudAlpha_1_4.fx (5.3 kB)