[vtkusers] alpha value in vtk shaders

Adam Bruss abruss at awrcorp.com
Wed Jul 7 09:58:11 EDT 2010


Hello,

 

How would one set an alpha value for "DiffuseColor" in this shader? I
tried setting number_of_elements to 4 and changing the value to "0.5 1.0
0.0 0.0" but it doesn't work.

 

<?xml version="1.0" encoding="UTF-8"?>

<Material name="Twisted">

  <Property name="Property1">

    <Member name="DiffuseColor" number_of_elements="3" type="Double"
value="1.0 0.0 0.0" />

  </Property>

 

  <Shader scope="Vertex" name="GLSLTwisted" location="Library" 

    language="GLSL" entry="main">

    <ApplicationUniform name="Rate" value="Rate"> </ApplicationUniform>

  </Shader>

  <!--

  <Shader scope="Fragment" name="GLSLTwisted"
location="c:/temp/GLSLTwistedFrag.glsl" language="GLSL" entry="main">

  </Shader>

    -->

</Material>

 

Thanks,

Adam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100707/f4498db1/attachment.htm>


More information about the vtkusers mailing list