<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19394"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013>Thanks to Gerrick Bivins for initial help 
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013>-&gt; unfortunately I am still stuck in how to access a 
polydata's data in a shader, I try to render the data as RGB, as a test, sending 
it from vertex to fragment shader:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013>Attached is the code, in python. </SPAN></FONT><FONT 
color=#0000ff size=2 face=Arial><SPAN class=837294515-25022013>Any of the shader 
and VTK programming gurus out there willing to take a look?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013>Help greatly appreciated, </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013>I am really missing a tutorial with a simple example 
that shows how you can access data from a vtkpolydata in a 
shader.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013>Thanks,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=837294515-25022013>Martin</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff size=2 face=Arial><SPAN class=837294515-25022013>PS: 
shader based on sandia's phong</SPAN></FONT></DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> Meister, Martin MM (E F CI C5 5) 
<BR><B>Gesendet:</B> Freitag, 22. Februar 2013 11:54<BR><B>An:</B> 
vtkusers@vtk.org<BR><B>Betreff:</B> [vtkusers] Access polydatas vtkFloatArrays 
from shader materials<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 face=Arial>Hello 
vtkusers,</FONT></SPAN></DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 face=Arial>I am looking for 
documentation on how I can access a polydata's float arrays from a shader 
material.</FONT></SPAN></DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 face=Arial>Is there an example 
that demonstrates this? </FONT></SPAN></DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 face=Arial>I did a test with a 
polydata and points float array that I mapped the "normal" way as colours per 
point. Then I changed to a material phong shader and wonder, how I can get the 
colours from the array back (applicationuniforms ?). Now, I only see the 
geometry with the specified "diffusecolor" of the property.</FONT></SPAN></DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 face=Arial>Thanks for any 
hints,</FONT></SPAN></DIV>
<DIV><SPAN class=819265110-22022013><FONT size=2 
face=Arial>Martin</FONT></SPAN></DIV></BODY></HTML>