<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=GLSL_Shaders</id>
	<title>GLSL Shaders - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=GLSL_Shaders"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;action=history"/>
	<updated>2026-04-29T17:59:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7376&amp;oldid=prev</id>
		<title>Pyadmin: 7 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7376&amp;oldid=prev"/>
		<updated>2014-03-28T02:00:46Z</updated>

		<summary type="html">&lt;p&gt;7 revisions&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:00, 28 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7375&amp;oldid=prev</id>
		<title>Shiven: /* Epilogue */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7375&amp;oldid=prev"/>
		<updated>2013-03-04T20:19:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Epilogue&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:19, 4 March 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l569&quot; &gt;Line 569:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 569:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Epilogue =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Epilogue =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The above is just a (very hackish) start. Feel free to modify, test and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;report back &lt;/del&gt;the changes/improvements you make. Have fun!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The above is just a (very hackish) start. Feel free to modify, test and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;edit this Wiki page with &lt;/ins&gt;the changes/improvements you make. Have fun!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Shiven</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7374&amp;oldid=prev</id>
		<title>Shiven: /* Cartoon Testing PyMOL Script */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7374&amp;oldid=prev"/>
		<updated>2013-03-04T20:19:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Cartoon Testing PyMOL Script&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:19, 4 March 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l507&quot; &gt;Line 507:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 507:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Cartoon Testing PyMOL Script ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Cartoon Testing PyMOL Script ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now test out the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cartoon &lt;/del&gt;shader by saving &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and running &lt;/del&gt;the following PyMOL script from the &amp;quot;File &amp;gt; Run&amp;quot; menu:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now test out the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sphere &lt;/ins&gt;shader by saving the following PyMOL script &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;as &amp;quot;test2.pml&amp;quot; and running it &lt;/ins&gt;from the &amp;quot;File &amp;gt; Run&amp;quot; menu:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br /&amp;gt;(If File &amp;gt; Run does not work for you, try typing in &amp;quot;@test2.pml&amp;quot; on the PyMOL command line. First make sure to &amp;quot;cd&amp;quot; on the PyMOL command line to the directory where you saved test2.pml)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;fetch 3V4K, async=0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;fetch 3V4K, async=0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Shiven</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7373&amp;oldid=prev</id>
		<title>Shiven: /* Sphere Testing PyMOL Script */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7373&amp;oldid=prev"/>
		<updated>2013-03-04T20:18:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Sphere Testing PyMOL Script&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:18, 4 March 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l252&quot; &gt;Line 252:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 252:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sphere Testing PyMOL Script ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sphere Testing PyMOL Script ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now test out the sphere shader by saving &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and running &lt;/del&gt;the following PyMOL script from the &amp;quot;File &amp;gt; Run&amp;quot; menu:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now test out the sphere shader by saving the following PyMOL script &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;as &amp;quot;test1.pml&amp;quot; and running it &lt;/ins&gt;from the &amp;quot;File &amp;gt; Run&amp;quot; menu:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br /&amp;gt;(If File &amp;gt; Run does not work for you, try typing in &amp;quot;@test1.pml&amp;quot; on the PyMOL command line. First make sure to &amp;quot;cd&amp;quot; on the PyMOL command line to the directory where you saved test1.pml)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;fetch 3V4K, async=0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;fetch 3V4K, async=0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Shiven</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7372&amp;oldid=prev</id>
		<title>YuWaiChen: /* Sphere Fragment Shader Code */ The instruction fo the code for sphere.fs was mis-typed as shaders.fs in 2 places. Corrected here.</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7372&amp;oldid=prev"/>
		<updated>2013-02-13T15:06:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Sphere Fragment Shader Code: &lt;/span&gt; The instruction fo the code for sphere.fs was mis-typed as shaders.fs in 2 places. Corrected here.&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:06, 13 February 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;Line 16:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 16:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sphere Fragment Shader Code ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Sphere Fragment Shader Code ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Rename the &amp;quot;sphere.fs&amp;quot; file in your PyMOL shaders directory to &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;shaders&lt;/del&gt;.fs.bak&amp;quot; then copy and save the following into a new file called &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;shaders&lt;/del&gt;.fs&amp;quot; (using a text editor) in the same directory:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Rename the &amp;quot;sphere.fs&amp;quot; file in your PyMOL shaders directory to &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sphere&lt;/ins&gt;.fs.bak&amp;quot; then copy and save the following into a new file called &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sphere&lt;/ins&gt;.fs&amp;quot; (using a text editor) in the same directory:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;// Sphere impostor fragment shader&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;// Sphere impostor fragment shader&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>YuWaiChen</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7371&amp;oldid=prev</id>
		<title>Shiven: /* Gallery */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7371&amp;oldid=prev"/>
		<updated>2012-06-12T20:28:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Gallery&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:28, 12 June 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot; &gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Gallery ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Gallery ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:GLSLToonSperes.png&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|600px|thumb|center|GLSL Toon Spheres&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:GLSLToonSperes.png]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:GLSLToonCartoon.png&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|600px|thumb|center|GLSL Toon Cartoon&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:GLSLToonCartoon.png]]&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Instructions =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Instructions =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Shiven</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7370&amp;oldid=prev</id>
		<title>Shiven at 20:22, 12 June 2012</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7370&amp;oldid=prev"/>
		<updated>2012-06-12T20:22:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:22, 12 June 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot; &gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Gallery ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Gallery ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;gallery&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[File:GLSLToonSperes.png]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[File:GLSLToonCartoon.png]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/gallery&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Instructions =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Instructions =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Shiven</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7369&amp;oldid=prev</id>
		<title>Shiven: Created page with &quot;= Introduction =  GLSL Shaders, shipped with PyMOL, may be modified to provide interesting and useful visual effects. The following modifications provide &quot;Toon&quot; shading effects, ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=GLSL_Shaders&amp;diff=7369&amp;oldid=prev"/>
		<updated>2012-06-12T20:18:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Introduction =  GLSL Shaders, shipped with PyMOL, may be modified to provide interesting and useful visual effects. The following modifications provide &amp;quot;Toon&amp;quot; shading effects, ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
GLSL Shaders, shipped with PyMOL, may be modified to provide interesting and useful visual effects. The following modifications provide &amp;quot;Toon&amp;quot; shading effects, in some ways similar to the illustrations by David Goodsell as seen in the RCSB/PDB &amp;quot;Molecule of the Month&amp;quot; series [http://www.rcsb.org/pdb/101/motm.do?momID=150].&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Instructions =&lt;br /&gt;
&lt;br /&gt;
The fragment shaders have been modified for [[Cartoon]] and [[Spheres]] only as of now.&lt;br /&gt;
The PyMOL shaders directory is located under:&lt;br /&gt;
* &amp;quot;/Applications/MacPyMOL.app/pymol/data/shaders&amp;quot; on Mac OSX&lt;br /&gt;
&lt;br /&gt;
== GLSL Toon Spheres ==&lt;br /&gt;
&lt;br /&gt;
=== Sphere Fragment Shader Code ===&lt;br /&gt;
Rename the &amp;quot;sphere.fs&amp;quot; file in your PyMOL shaders directory to &amp;quot;shaders.fs.bak&amp;quot; then copy and save the following into a new file called &amp;quot;shaders.fs&amp;quot; (using a text editor) in the same directory:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
// Sphere impostor fragment shader&lt;br /&gt;
&lt;br /&gt;
// Sphere Toon Shading code modifications by Shivender Shandilya, 2012&lt;br /&gt;
&lt;br /&gt;
uniform bool lighting_enabled;&lt;br /&gt;
&lt;br /&gt;
uniform float ortho;&lt;br /&gt;
&lt;br /&gt;
uniform float fog_enabled;&lt;br /&gt;
uniform bool bg_gradient;&lt;br /&gt;
uniform vec3 fog_color_top;&lt;br /&gt;
uniform vec3 fog_color_bottom;&lt;br /&gt;
uniform float inv_height;&lt;br /&gt;
uniform int light_count;&lt;br /&gt;
uniform float shininess;&lt;br /&gt;
uniform float shininess_0;&lt;br /&gt;
uniform int spec_count;&lt;br /&gt;
uniform float spec_value;&lt;br /&gt;
uniform float spec_value_0;&lt;br /&gt;
uniform int stereo_flag;&lt;br /&gt;
uniform mat3 matL;&lt;br /&gt;
uniform mat3 matR;&lt;br /&gt;
uniform float gamma;&lt;br /&gt;
&lt;br /&gt;
varying vec4 COLOR;&lt;br /&gt;
varying vec3 sphere_center;&lt;br /&gt;
varying float radius2;&lt;br /&gt;
varying vec3 point;&lt;br /&gt;
// varying fog;&lt;br /&gt;
&lt;br /&gt;
vec4 ComputeColorForLight(vec3 N, vec3 L, vec3 H, vec4 ambient, vec4 diffuse, float spec, float shine){&lt;br /&gt;
  float NdotL, NdotH;&lt;br /&gt;
  vec4 ret_val = vec4(0.);&lt;br /&gt;
&lt;br /&gt;
  //&lt;br /&gt;
  // Begin code for calculating the Sphere Outline&lt;br /&gt;
  //&lt;br /&gt;
  float spheredge = dot(N,L);&lt;br /&gt;
  float edgeweight = 1.025;&lt;br /&gt;
  float edgegain = 16.0;&lt;br /&gt;
  spheredge = edgeweight - (spheredge * spheredge);&lt;br /&gt;
  spheredge = 1.0 - pow(spheredge, shine * edgegain);&lt;br /&gt;
  diffuse = mix(diffuse, diffuse * spheredge, shine);&lt;br /&gt;
&lt;br /&gt;
  ret_val += diffuse * COLOR;&lt;br /&gt;
&lt;br /&gt;
  NdotL = dot(N, L);&lt;br /&gt;
  if (NdotL &amp;gt; 0.0) {&lt;br /&gt;
    ret_val += diffuse * NdotL * COLOR;&lt;br /&gt;
    NdotH = max(dot(N, H), 0.0);&lt;br /&gt;
    ret_val += spec * pow(NdotH, shine);&lt;br /&gt;
  }&lt;br /&gt;
  return ret_val;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main(void)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    vec3 ray_origin = mix(vec3(0.,0.,0.), point, ortho);&lt;br /&gt;
&lt;br /&gt;
    vec3 ray_direction = mix(normalize(point), vec3(0., 0., 1.), ortho);&lt;br /&gt;
&lt;br /&gt;
    vec3 sphere_direction = mix(sphere_center, ray_origin - sphere_center, ortho);&lt;br /&gt;
&lt;br /&gt;
    // Calculate sphere-ray intersection&lt;br /&gt;
    float b = dot(sphere_direction, ray_direction);&lt;br /&gt;
&lt;br /&gt;
    float position = b * b + radius2 - dot(sphere_direction, sphere_direction);&lt;br /&gt;
&lt;br /&gt;
    // Check if the ray missed the sphere&lt;br /&gt;
    if (position &amp;lt; 0.0)&lt;br /&gt;
       discard;&lt;br /&gt;
&lt;br /&gt;
    // Calculate nearest point of intersection&lt;br /&gt;
    float nearest = mix(b - sqrt(position), sqrt(position) - b, ortho);&lt;br /&gt;
&lt;br /&gt;
    // Calculate intersection point on the sphere surface.  The ray&lt;br /&gt;
    // origin is at the quad (center point), so we need to project&lt;br /&gt;
    // back towards the user to get the front face.&lt;br /&gt;
    vec3 ipoint = nearest * ray_direction + ray_origin;&lt;br /&gt;
&lt;br /&gt;
    // Calculate normal at the intersection point&lt;br /&gt;
    vec3 N = normalize(ipoint - sphere_center);&lt;br /&gt;
&lt;br /&gt;
    // Calculate depth in clipping space&lt;br /&gt;
    vec2 clipZW = ipoint.z * gl_ProjectionMatrix[2].zw +&lt;br /&gt;
        gl_ProjectionMatrix[3].zw;&lt;br /&gt;
&lt;br /&gt;
    float depth = 0.5 + 0.5 * clipZW.x / clipZW.y;&lt;br /&gt;
&lt;br /&gt;
    // this is a workaround necessary for Mac&lt;br /&gt;
    // otherwise the modified fragment wont clip properly&lt;br /&gt;
&lt;br /&gt;
    if (depth &amp;lt;= 0.0)&lt;br /&gt;
      discard;&lt;br /&gt;
&lt;br /&gt;
    if (depth &amp;gt;= 1.0)&lt;br /&gt;
      discard;&lt;br /&gt;
&lt;br /&gt;
    if (COLOR.a &amp;lt;= 1.0)&lt;br /&gt;
      gl_FragDepth = depth;&lt;br /&gt;
    else&lt;br /&gt;
      gl_FragDepth = 1.0;&lt;br /&gt;
&lt;br /&gt;
    vec4 color;&lt;br /&gt;
&lt;br /&gt;
    vec3 L0 = normalize(vec3(gl_LightSource[0].position) - ipoint);&lt;br /&gt;
&lt;br /&gt;
    float NdotL = max(dot(N, L0), 0.0);&lt;br /&gt;
&lt;br /&gt;
    float NdotH;&lt;br /&gt;
&lt;br /&gt;
    vec4 final_color = gl_LightModel.ambient * COLOR;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
    if (light_count&amp;gt;0){&lt;br /&gt;
      final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[0].position)),&lt;br /&gt;
                                          normalize(vec3(gl_LightSource[0].halfVector.xyz)),&lt;br /&gt;
                                          gl_LightSource[0].ambient,&lt;br /&gt;
                                          gl_LightSource[0].diffuse,&lt;br /&gt;
                                          spec_value_0, shininess_0);&lt;br /&gt;
      if (light_count&amp;gt;1){&lt;br /&gt;
        final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[1].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[1].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[1].ambient,&lt;br /&gt;
                                            gl_LightSource[1].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;2){&lt;br /&gt;
        final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[2].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[2].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[2].ambient,&lt;br /&gt;
                                            gl_LightSource[2].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;3){&lt;br /&gt;
        final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[3].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[3].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[3].ambient,&lt;br /&gt;
                                            gl_LightSource[3].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;4){&lt;br /&gt;
        final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[4].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[4].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[4].ambient,&lt;br /&gt;
                                            gl_LightSource[4].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;5){&lt;br /&gt;
        final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[5].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[5].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[5].ambient,&lt;br /&gt;
                                            gl_LightSource[5].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;6){&lt;br /&gt;
        final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[6].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[6].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[6].ambient,&lt;br /&gt;
                                            gl_LightSource[6].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;7){&lt;br /&gt;
        final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[7].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[7].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[7].ambient,&lt;br /&gt;
                                            gl_LightSource[7].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
    }}}}}}}}&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    int i;&lt;br /&gt;
    for (i=0; i&amp;lt;light_count; i++){&lt;br /&gt;
      vec3 L = normalize(gl_LightSource[i].position.xyz);&lt;br /&gt;
      vec3 H = normalize(gl_LightSource[i].halfVector.xyz);&lt;br /&gt;
      float spec = 0., shine = 0.;&lt;br /&gt;
      if (i==0){&lt;br /&gt;
        spec = spec_value_0;&lt;br /&gt;
        shine = shininess_0;&lt;br /&gt;
      } else if (spec_count &amp;gt;= i){&lt;br /&gt;
        spec = spec_value;&lt;br /&gt;
        shine = shininess;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      //      final_color += gl_LightSource[i].ambient * COLOR;&lt;br /&gt;
&lt;br /&gt;
      final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[i].position)),&lt;br /&gt;
                                          normalize(vec3(gl_LightSource[i].halfVector.xyz)),&lt;br /&gt;
                                          gl_LightSource[i].ambient * COLOR,&lt;br /&gt;
                                          gl_LightSource[i].diffuse * COLOR,&lt;br /&gt;
                                          spec, shine);&lt;br /&gt;
&lt;br /&gt;
      NdotL = dot(N, L);&lt;br /&gt;
&lt;br /&gt;
      if (NdotL &amp;gt; 0.0) {&lt;br /&gt;
&lt;br /&gt;
        //    final_color += gl_LightSource[i].diffuse * NdotL * COLOR;&lt;br /&gt;
&lt;br /&gt;
        final_color += ComputeColorForLight(N, normalize(vec3(gl_LightSource[i].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[i].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[i].ambient * COLOR,&lt;br /&gt;
                                            gl_LightSource[i].diffuse * COLOR * NdotL * 0.333,&lt;br /&gt;
                                            spec, shine);&lt;br /&gt;
      }&lt;br /&gt;
        NdotH = max(dot(N, H), 0.0);&lt;br /&gt;
        final_color += spec * pow(NdotH, shine);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    float fog = clamp((gl_Fog.end + ipoint.z) * gl_Fog.scale, 0.0, 1.0);&lt;br /&gt;
    fog = mix(1.0, fog, fog_enabled);&lt;br /&gt;
    vec3 fog_color;&lt;br /&gt;
&lt;br /&gt;
    if (bg_gradient){&lt;br /&gt;
      fog_color = mix(fog_color_bottom, fog_color_top, gl_FragCoord.y * inv_height);&lt;br /&gt;
    } else {&lt;br /&gt;
      fog_color = fog_color_top;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    final_color.rgb = mix(fog_color, final_color.rgb, fog);&lt;br /&gt;
&lt;br /&gt;
    vec4 f = vec4(final_color.rgb, COLOR.a);&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Fake shadows based on depth&lt;br /&gt;
    //&lt;br /&gt;
    // vec4 f = vec4(final_color.rgb * ( 1.05 - gl_FragDepth), COLOR.a);&lt;br /&gt;
&lt;br /&gt;
  if(stereo_flag==-1)&lt;br /&gt;
    gl_FragColor = vec4(matL * pow(f.rgb,vec3(gamma,gamma,gamma)), f.a);&lt;br /&gt;
  else if (stereo_flag==0)&lt;br /&gt;
    gl_FragColor = f;&lt;br /&gt;
  else if (stereo_flag==1)&lt;br /&gt;
    gl_FragColor = vec4(matR * pow(f.rgb, vec3(gamma,gamma,gamma)), f.a);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sphere Testing PyMOL Script ===&lt;br /&gt;
Now test out the sphere shader by saving and running the following PyMOL script from the &amp;quot;File &amp;gt; Run&amp;quot; menu:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 3V4K, async=0&lt;br /&gt;
show sphere, all&lt;br /&gt;
select solv, solvent&lt;br /&gt;
remove solv&lt;br /&gt;
delete solv&lt;br /&gt;
remove e. H&lt;br /&gt;
set sphere_mode, 9&lt;br /&gt;
set ambient, 0.25&lt;br /&gt;
set_color carbons, [100, 225,90]&lt;br /&gt;
set_color others, [75, 100, 230]&lt;br /&gt;
util.cbaw 3V4K&lt;br /&gt;
set sphere_scale, 1.05&lt;br /&gt;
set orthoscopic, 1&lt;br /&gt;
&lt;br /&gt;
set_view (\&lt;br /&gt;
    -0.327029049,   -0.944887519,    0.015455140,\&lt;br /&gt;
     0.943798959,   -0.327394068,   -0.045230716,\&lt;br /&gt;
     0.047797613,   -0.000204348,    0.998857021,\&lt;br /&gt;
     0.000143192,   -0.000024423, -184.973327637,\&lt;br /&gt;
   -14.873787880,  -17.664234161,   35.063804626,\&lt;br /&gt;
   136.028396606,  233.926559448,   20.000000000 )&lt;br /&gt;
&lt;br /&gt;
cmd.set('light_count',9)&lt;br /&gt;
cmd.set(&amp;quot;light&amp;quot; ,&amp;quot;[-0.2,-0.2,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light2&amp;quot;,&amp;quot;[-0.2, 0.0,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light3&amp;quot;,&amp;quot;[-0.2, 0.2,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light4&amp;quot;,&amp;quot;[ 0.0, 0.2,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light5&amp;quot;,&amp;quot;[ 0.2, 0.2,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light6&amp;quot;,&amp;quot;[ 0.2, 0.0,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light7&amp;quot;,&amp;quot;[ 0.2,-0.2,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light8&amp;quot;,&amp;quot;[ 0.0,-0.2,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light9&amp;quot;,&amp;quot;[ 0.0,-0.2,-1.0]&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
cmd.set('ambient',0.15)&lt;br /&gt;
cmd.set('direct',0.10)&lt;br /&gt;
cmd.set('reflect',0.80)&lt;br /&gt;
cmd.set('shininess',10)&lt;br /&gt;
cmd.set('spec_count',-1)&lt;br /&gt;
cmd.set('power',1.0)&lt;br /&gt;
cmd.set('specular_intensity',0)&lt;br /&gt;
cmd.set('spec_direct',0.0)&lt;br /&gt;
cmd.set('ray_shadow_decay_factor',0.1)&lt;br /&gt;
cmd.set('ray_shadow_decay_range',5.0)&lt;br /&gt;
cmd.set('bg_rgb',[1.0, 1.0, 1.0])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
viewport 1024, 768&lt;br /&gt;
draw 1024, 768, 8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GLSL Toon Cartoons ==&lt;br /&gt;
&lt;br /&gt;
=== Cartoon Fragment Shader Code ===&lt;br /&gt;
Rename the &amp;quot;default_es2.fs&amp;quot; file in your PyMOL shaders directory to &amp;quot;default_es2.fs.bak&amp;quot; then copy and save the following into a new file called &amp;quot;default_es2.fs&amp;quot; (using a text editor) in the same directory: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
// Cartoon Toon Shading code modifications by Shivender Shandilya, 2012&lt;br /&gt;
&lt;br /&gt;
varying vec3 packed_data_0 ;&lt;br /&gt;
varying vec4 packed_data_1 ;&lt;br /&gt;
varying vec4 packed_data_2 ;&lt;br /&gt;
varying vec4 packed_data_3 ;&lt;br /&gt;
varying vec4 packed_data_4 ;&lt;br /&gt;
&lt;br /&gt;
//varying vec3 N;&lt;br /&gt;
#define NORMAL packed_data_0.xyz&lt;br /&gt;
#define COLOR packed_data_3&lt;br /&gt;
#define fog (packed_data_1.w )&lt;br /&gt;
#define fog_color packed_data_1.x, packed_data_1.y, packed_data_1.z&lt;br /&gt;
&lt;br /&gt;
uniform float fog_enabled;&lt;br /&gt;
&lt;br /&gt;
uniform bool lighting_enabled;&lt;br /&gt;
uniform bool two_sided_lighting_enabled;&lt;br /&gt;
uniform bool bg_gradient;&lt;br /&gt;
uniform int light_count;&lt;br /&gt;
uniform vec4 interior_color;&lt;br /&gt;
uniform float interior_color_threshold;&lt;br /&gt;
uniform float shininess;&lt;br /&gt;
uniform float shininess_0;&lt;br /&gt;
uniform bool use_interior_color_threshold;&lt;br /&gt;
uniform int spec_count;&lt;br /&gt;
uniform float spec_value;&lt;br /&gt;
uniform float spec_value_0;&lt;br /&gt;
uniform int stereo_flag;&lt;br /&gt;
uniform mat3 matR;&lt;br /&gt;
uniform mat3 matL;&lt;br /&gt;
uniform float gamma;&lt;br /&gt;
&lt;br /&gt;
vec4 ComputeColorForLight(bool is_interior, bool two_sided_lighting_enabled,&lt;br /&gt;
                          vec3 L, vec3 H, vec4 ambient, vec4 diffuse, float spec, float shine){&lt;br /&gt;
  float NdotL, NdotH;&lt;br /&gt;
  vec4 ret_val = vec4(0.);&lt;br /&gt;
&lt;br /&gt;
  if (!is_interior){&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Begin code for calculating the Cartoon Outline&lt;br /&gt;
    //&lt;br /&gt;
    float cartedge = dot(NORMAL, L);&lt;br /&gt;
    float edgeweight = 1.15;&lt;br /&gt;
    float edgegain = 16.0;&lt;br /&gt;
    cartedge = edgeweight - (cartedge * cartedge);&lt;br /&gt;
    cartedge = 1.0 - pow(cartedge, shine * edgegain);&lt;br /&gt;
    diffuse = mix(diffuse, diffuse * cartedge, shine);&lt;br /&gt;
&lt;br /&gt;
    ret_val += diffuse * COLOR;&lt;br /&gt;
&lt;br /&gt;
    NdotL = dot(NORMAL, L);&lt;br /&gt;
&lt;br /&gt;
    if (NdotL &amp;gt; 0.0) {&lt;br /&gt;
       ret_val += diffuse * NdotL * COLOR;&lt;br /&gt;
       NdotH = max(dot(NORMAL, H), 0.0);&lt;br /&gt;
       ret_val += spec * pow(NdotH, shine);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  if (two_sided_lighting_enabled &amp;amp;&amp;amp; is_interior){&lt;br /&gt;
    //&lt;br /&gt;
    // Begin code for calculating the Cartoon Outline&lt;br /&gt;
    //&lt;br /&gt;
    float cartedge = dot(NORMAL, L);&lt;br /&gt;
    float edgeweight = 1.15;&lt;br /&gt;
    float edgegain = 16.0;&lt;br /&gt;
    cartedge = edgeweight - (cartedge * cartedge);&lt;br /&gt;
    cartedge = 1.0 - pow(cartedge, shine * edgegain);&lt;br /&gt;
    diffuse = mix(diffuse, diffuse * cartedge, shine);&lt;br /&gt;
&lt;br /&gt;
    ret_val += diffuse * COLOR;&lt;br /&gt;
&lt;br /&gt;
    NdotL = dot(-NORMAL, L);&lt;br /&gt;
&lt;br /&gt;
    if (NdotL &amp;gt; 0.0) {&lt;br /&gt;
       ret_val += diffuse * NdotL * COLOR;&lt;br /&gt;
       NdotH = max(dot(-NORMAL, H), 0.0);&lt;br /&gt;
       ret_val += spec * pow(NdotH, shine);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return ret_val;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
  vec4 final_color = vec4(0.);&lt;br /&gt;
&lt;br /&gt;
  if (lighting_enabled){&lt;br /&gt;
    bool is_interior = false;&lt;br /&gt;
    if (use_interior_color_threshold){&lt;br /&gt;
      vec3 viewV = vec3(0.,0.,-1.);&lt;br /&gt;
      float dotp = dot(NORMAL, viewV);&lt;br /&gt;
      is_interior = ( dotp &amp;gt; interior_color_threshold );&lt;br /&gt;
    }&lt;br /&gt;
    if (!two_sided_lighting_enabled &amp;amp;&amp;amp; is_interior){&lt;br /&gt;
      final_color = interior_color;&lt;br /&gt;
    } else {&lt;br /&gt;
      final_color = (gl_LightModel.ambient) * COLOR;&lt;br /&gt;
&lt;br /&gt;
      if (light_count&amp;gt;0){&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled,&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[0].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[0].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[0].ambient,&lt;br /&gt;
                                            gl_LightSource[0].diffuse,&lt;br /&gt;
                                            spec_value_0, shininess_0);&lt;br /&gt;
      if (light_count&amp;gt;1){&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled,&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[1].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[1].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[1].ambient,&lt;br /&gt;
                                            gl_LightSource[1].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;2){&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled,&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[2].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[2].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[2].ambient,&lt;br /&gt;
                                            gl_LightSource[2].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;3){&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled,&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[3].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[3].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[3].ambient,&lt;br /&gt;
                                            gl_LightSource[3].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;4){&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled,&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[4].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[4].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[4].ambient,&lt;br /&gt;
                                            gl_LightSource[4].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;5){&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled,&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[5].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[5].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[5].ambient,&lt;br /&gt;
                                            gl_LightSource[5].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;6){&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled,&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[6].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[6].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[6].ambient,&lt;br /&gt;
                                            gl_LightSource[6].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      if (light_count&amp;gt;7){&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled,&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[7].position)),&lt;br /&gt;
                                            normalize(vec3(gl_LightSource[7].halfVector.xyz)),&lt;br /&gt;
                                            gl_LightSource[7].ambient,&lt;br /&gt;
                                            gl_LightSource[7].diffuse,&lt;br /&gt;
                                            spec_value, shininess);&lt;br /&gt;
      }}}}}}}}&lt;br /&gt;
    }&lt;br /&gt;
/*&lt;br /&gt;
      for (i=0; i&amp;lt;light_count;i++){&lt;br /&gt;
        vec3 L = normalize(vec3(gl_LightSource[i].position));&lt;br /&gt;
        vec3 H = normalize(vec3(gl_LightSource[i].halfVector.xyz));&lt;br /&gt;
        vec4 ambient = gl_LightSource[i].ambient;&lt;br /&gt;
        vec4 diffuse = gl_LightSource[i].diffuse;&lt;br /&gt;
        float spec = 0., shine = 0.;&lt;br /&gt;
        if (i==0){&lt;br /&gt;
          spec = spec_value_0;&lt;br /&gt;
          shine = shininess_0;&lt;br /&gt;
        } else if (spec_count &amp;gt;= i){&lt;br /&gt;
          spec = spec_value;&lt;br /&gt;
          shine = shininess;&lt;br /&gt;
        }&lt;br /&gt;
        final_color += ComputeColorForLight(is_interior, two_sided_lighting_enabled, L, H, ambient, diffuse, spec, shine);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
*/&lt;br /&gt;
  } else {&lt;br /&gt;
    final_color = COLOR;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  float cfog = mix(1.0, clamp(fog, 0.0, 1.0), fog_enabled);&lt;br /&gt;
&lt;br /&gt;
  vec4 f = vec4(mix(vec3(fog_color), final_color.rgb, cfog), COLOR.a);&lt;br /&gt;
&lt;br /&gt;
  if(stereo_flag==-1)&lt;br /&gt;
    gl_FragColor = vec4(matL * pow(f.rgb,vec3(gamma,gamma,gamma)), f.a);&lt;br /&gt;
  else if (stereo_flag==0)&lt;br /&gt;
    gl_FragColor = f;&lt;br /&gt;
  else if (stereo_flag==1)&lt;br /&gt;
    gl_FragColor = vec4(matR * pow(f.rgb, vec3(gamma,gamma,gamma)), f.a);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Cartoon Testing PyMOL Script ===&lt;br /&gt;
Now test out the cartoon shader by saving and running the following PyMOL script from the &amp;quot;File &amp;gt; Run&amp;quot; menu:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 3V4K, async=0&lt;br /&gt;
hide all&lt;br /&gt;
show cartoon, all&lt;br /&gt;
select solv, solvent&lt;br /&gt;
remove solv&lt;br /&gt;
delete solv&lt;br /&gt;
remove e. H&lt;br /&gt;
set ambient, 0.25&lt;br /&gt;
color brown, 3V4K&lt;br /&gt;
set orthoscopic, 1&lt;br /&gt;
&lt;br /&gt;
set cartoon_dumbbell_length, 0.85&lt;br /&gt;
set cartoon_dumbbell_radius, 0.15&lt;br /&gt;
set cartoon_dumbbell_width, 0.15&lt;br /&gt;
set cartoon_fancy_helices, on&lt;br /&gt;
&lt;br /&gt;
set cartoon_rect_length, 0.85&lt;br /&gt;
set cartoon_rect_width, 0.15&lt;br /&gt;
&lt;br /&gt;
set cartoon_loop_radius, 0.15&lt;br /&gt;
&lt;br /&gt;
set_view (\&lt;br /&gt;
    -0.811935484,    0.547164500,   -0.203404382,\&lt;br /&gt;
     0.385375530,    0.240704626,   -0.890811384,\&lt;br /&gt;
    -0.438461006,   -0.801668167,   -0.406299770,\&lt;br /&gt;
     0.000018395,    0.000004439,  -80.686973572,\&lt;br /&gt;
   -14.601868629,   -7.145599365,   10.938076973,\&lt;br /&gt;
    26.767528534,  134.606826782,   20.000000000 )&lt;br /&gt;
&lt;br /&gt;
cmd.set('light_count',9)&lt;br /&gt;
cmd.set(&amp;quot;light&amp;quot; ,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light2&amp;quot;,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light3&amp;quot;,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light4&amp;quot;,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light5&amp;quot;,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light6&amp;quot;,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light7&amp;quot;,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light8&amp;quot;,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
cmd.set(&amp;quot;light9&amp;quot;,&amp;quot;[0.9,0.9,-1.0]&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
cmd.set('ambient',0.15)&lt;br /&gt;
cmd.set('direct',0.10)&lt;br /&gt;
cmd.set('reflect',0.80)&lt;br /&gt;
cmd.set('shininess',0)&lt;br /&gt;
cmd.set('spec_count',0)&lt;br /&gt;
cmd.set('power',1.0)&lt;br /&gt;
cmd.set('specular_intensity',0)&lt;br /&gt;
cmd.set('spec_direct',0.0)&lt;br /&gt;
cmd.set('ray_shadow_decay_factor',0.1)&lt;br /&gt;
cmd.set('ray_shadow_decay_range',5.0)&lt;br /&gt;
cmd.set('bg_rgb',[0.75, 0.75, 0.75])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
viewport 1024, 768&lt;br /&gt;
draw 1024, 768, 8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Epilogue =&lt;br /&gt;
&lt;br /&gt;
The above is just a (very hackish) start. Feel free to modify, test and report back the changes/improvements you make. Have fun!&lt;/div&gt;</summary>
		<author><name>Shiven</name></author>
	</entry>
</feed>