[vtkusers] alpha value in vtk shaders

Adam Bruss abruss at awrcorp.com
Wed Jul 7 12:28:46 EDT 2010


Thanks, worked like a charm.

 

Adam Bruss

Development Engineer

AWR Corporation/Simulation Technology & Applied Research

11520 N. Port Washington Rd., Suite 201

Mequon, WI  53092  USA

P: 1.262.240.0291 x104

F: 1.262.240.0294

E: abruss at awrcorp.com

W: http://www.awrcorp.com <http://www.awrcorp.com> 

 

From: Karthik Krishnan [mailto:karthik.krishnan at kitware.com] 
Sent: Wednesday, July 07, 2010 11:09 AM
To: Adam Bruss
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] alpha value in vtk shaders

 

You can't set an alpha value for the diffuse, ambient or specular color
separately, in VTK. Use the <Member name="Opacity"... > instead.

--
karthik

On Wed, Jul 7, 2010 at 7:28 PM, Adam Bruss <abruss at awrcorp.com> wrote:

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


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

 

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


More information about the vtkusers mailing list