[vtkusers] alpha value in vtk shaders

Karthik Krishnan karthik.krishnan at kitware.com
Wed Jul 7 12:09:29 EDT 2010


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/db5b9c1b/attachment.htm>


More information about the vtkusers mailing list