<div dir="ltr">Glad that helped Kumar, I don't have time to dig into your specific code, but when I run into shader issues I usually try hardcoding parts of the shader or simplifying parts until I get to a point where it is simple enough to track down the issue. In this case as you are seieng lines but they are not wide, seems like something is bad in your computed vertex positions in the GS</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 9, 2018 at 10:04 AM, Kumar Ashutosh <span dir="ltr"><<a href="mailto:kumar.ashutosh.ee@gmail.com" target="_blank">kumar.ashutosh.ee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks, Ken for showing interest in this issue.<br>You were correct that a uniform value was defaulting to 0.0. So I manually replaced them with a vec2. The line does render now but the behaves only as a normal line and not as a WideLine. My implementation can be seen <a href="https://gist.github.com/thechargedneutron/0cfb5abb9531279bf9f80d6f38410aaf" target="_blank">here</a>. In this code, case1 is the normal line, case2 is with SetRenderLineAsTubes() and case3 is the manual GS part which I am trying to implement. I have replaced the uniform vec2 variable lineWidthNVC with vec2(0.1, 0.1) . This renders as a normal line and not as a Tube. Kindly see if I am making any mistake in injecting the shader.<br><br>Regards,<br>Kumar Ashutosh</div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aa3VtYXIuYXNodXRvc2guZWVAZ21haWwuY29t&type=zerocontent&guid=af2c4356-db63-4347-946c-1e34c5750d8e"><font color="#ffffff" size="1">ᐧ</font></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 9, 2018 at 8:54 PM, Ken Martin <span dir="ltr"><<a href="mailto:ken.martin@kitware.com" target="_blank">ken.martin@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Using your own shader code is a bit advanced as there are a few moving parts. If you specify geometry shader code then you also have to make sure the right uniforms/arrays are being set for that shader code. That would be my guess as to the issue with your attempt to manually specify wide lines. Maybe the code is fine but some uniforms are not properly set and so are defaulting to 0.0 etc.<div><br></div><div>I agree an example of geometry replacements would be good. If you get something working let me know and I'll add it to the wiki page on custom shaders.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-7238991762745163102h5">On Wed, Jul 4, 2018 at 9:11 AM, Kumar Ashutosh <span dir="ltr"><<a href="mailto:kumar.ashutosh.ee@gmail.com" target="_blank">kumar.ashutosh.ee@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-7238991762745163102h5"><div dir="ltr">
<span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I want to add custom Geometry Shader to my mapper. From the source code, I concluded that in vtkOpenGLPolyDataMapper we can inject custom Shader Code. Also, the code has WideLineGS as the default Geometry Shader. I tried to mimic the same behaviour by injecting the same code as given<span> </span></span><a href="https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/OpenGL2/glsl/vtkPolyDataWideLineGS.glsl" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">here</a><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> (source code of WideLinesGS) using the function SetGeometryShaderCode. The resulting screen is a blank screen with no errors raised. </span><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Can someone please guide me on how to inject Geometry Shader Code. This is specific to Geometry Shader only as I have successfully tried with Frag Shader and Vertex Shader. </span><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">A simple example of this would be great.</span><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Regards,</span><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Kumar Ashutosh</span><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span></span>
<br></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aa3VtYXIuYXNodXRvc2guZWVAZ21haWwuY29t&type=zerocontent&guid=55547dd3-e5a1-4e85-8d75-2c34faa6008f"><font color="#ffffff" size="1">ᐧ</font></div>
<br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/vtkusers</a><br>
<br></blockquote></div><span class="m_-7238991762745163102HOEnZb"><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-7238991762745163102m_-2829200823378325692gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div><a href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+%0D%0A27510+USA&entry=gmail&source=g" target="_blank">101 East Weaver Street</a><br><a href="https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+%0D%0A27510+USA&entry=gmail&source=g" target="_blank">Carrboro, North Carolina</a><br>
27510 USA<br><br><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message.
Thank you.</span></div></div></div></div></div></div></div>
</font></span></font></span></div>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>101 East Weaver Street<br>Carrboro, North Carolina<br>
27510 USA<br><br><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message.
Thank you.</span></div></div></div></div></div></div></div>
</div>