<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
		<id>https://wiki.delphigl.com/index.php?action=history&amp;feed=atom&amp;title=shader_game_of_life</id>
		<title>shader game of life - Versionsgeschichte</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.delphigl.com/index.php?action=history&amp;feed=atom&amp;title=shader_game_of_life"/>
		<link rel="alternate" type="text/html" href="https://wiki.delphigl.com/index.php?title=shader_game_of_life&amp;action=history"/>
		<updated>2026-04-29T18:13:06Z</updated>
		<subtitle>Versionsgeschichte dieser Seite in DGL Wiki</subtitle>
		<generator>MediaWiki 1.27.4</generator>

	<entry>
		<id>https://wiki.delphigl.com/index.php?title=shader_game_of_life&amp;diff=24285&amp;oldid=prev</id>
		<title>Dj3hut1 am 3. November 2009 um 20:28 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.delphigl.com/index.php?title=shader_game_of_life&amp;diff=24285&amp;oldid=prev"/>
				<updated>2009-11-03T20:28:27Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='de'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Version vom 3. November 2009, 20:28 Uhr&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-l92&quot; &gt;Zeile 92:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 92:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Demo ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Demo ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; 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:black; 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;[http://algoria.de/opengl/demos/life.jnlp Demo] ''(mit Quellen)''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;[http://algoria.de/opengl/demos/life.jnlp &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Java &lt;/ins&gt;Demo] ''(mit Quellen)''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;[http://algoria.de/demos/life.html WebGL Demo]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dj3hut1</name></author>	</entry>

	<entry>
		<id>https://wiki.delphigl.com/index.php?title=shader_game_of_life&amp;diff=23207&amp;oldid=prev</id>
		<title>Dj3hut1: /* Code */  Link auf Demo</title>
		<link rel="alternate" type="text/html" href="https://wiki.delphigl.com/index.php?title=shader_game_of_life&amp;diff=23207&amp;oldid=prev"/>
				<updated>2009-03-29T20:44:13Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Code: &lt;/span&gt;  Link auf Demo&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='de'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Version vom 29. März 2009, 20:44 Uhr&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-l69&quot; &gt;Zeile 69:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; //Nachbarn berechnen&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; //Nachbarn berechnen&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:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0 &lt;/del&gt;&amp;amp;&amp;amp; y &amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0 &lt;/del&gt;) neighbours += lookup( x - 1, y - 1 );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1 &lt;/ins&gt;&amp;amp;&amp;amp; y &amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1 &lt;/ins&gt;) neighbours += lookup( x - 1, y - 1 );&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:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( y &amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0 &lt;/del&gt;) neighbours += lookup( x, y - 1 );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( y &amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1 &lt;/ins&gt;) neighbours += lookup( x, y - 1 );&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:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;lt; SIZE - 1 &amp;amp;&amp;amp; y &amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0 &lt;/del&gt;) neighbours += lookup( x + 1, y - 1 );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;lt; SIZE - 1 &amp;amp;&amp;amp; y &amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1 &lt;/ins&gt;) neighbours += lookup( x + 1, y - 1 );&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:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0 &lt;/del&gt;) neighbours += lookup( x - 1, y );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1 &lt;/ins&gt;) neighbours += lookup( x - 1, y );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;lt; SIZE - 1 ) neighbours += lookup( x + 1, y );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;lt; SIZE - 1 ) neighbours += lookup( x + 1, y );&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:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;0 &lt;/del&gt;&amp;amp;&amp;amp; y &amp;lt; SIZE - 1 ) neighbours += lookup( x - 1, y + 1 );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1 &lt;/ins&gt;&amp;amp;&amp;amp; y &amp;lt; SIZE - 1 ) neighbours += lookup( x - 1, y + 1 );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if ( y &amp;lt; SIZE - 1 ) neighbours += lookup( x, y + 1 );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if ( y &amp;lt; SIZE - 1 ) neighbours += lookup( x, y + 1 );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;lt; SIZE - 1 &amp;amp;&amp;amp; y &amp;lt; SIZE - 1 ) neighbours += lookup( x + 1, y + 1 );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if ( x &amp;lt; SIZE - 1 &amp;amp;&amp;amp; y &amp;lt; SIZE - 1 ) neighbours += lookup( x + 1, y + 1 );&lt;/div&gt;&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-l89&quot; &gt;Zeile 89:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 89:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; 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;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; 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 colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Demo ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[http://algoria.de/opengl/demos/life.jnlp Demo] ''(mit Quellen)''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dj3hut1</name></author>	</entry>

	<entry>
		<id>https://wiki.delphigl.com/index.php?title=shader_game_of_life&amp;diff=23201&amp;oldid=prev</id>
		<title>Dj3hut1: Erstellung</title>
		<link rel="alternate" type="text/html" href="https://wiki.delphigl.com/index.php?title=shader_game_of_life&amp;diff=23201&amp;oldid=prev"/>
				<updated>2009-03-27T21:43:37Z</updated>
		
		<summary type="html">&lt;p&gt;Erstellung&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Game of Life=&lt;br /&gt;
Zurück zur [[Shadersammlung]]&lt;br /&gt;
{|{{Prettytable_B1}} width=100%&lt;br /&gt;
!width=60%|Beschreibung&lt;br /&gt;
!width=20%|Autor&lt;br /&gt;
!width=20%|Version&lt;br /&gt;
|-&lt;br /&gt;
|Simuliert das altbekannte Game Of Life.&lt;br /&gt;
|dj3hut1&lt;br /&gt;
|1.0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Bilder==&lt;br /&gt;
{|&lt;br /&gt;
|[[Bild:Game_of_life.png|framed|Szene aus 'Game of Life'.]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Beschreibung==&lt;br /&gt;
Ein Fragmentshader wird dazu benutzt, um das 'Game of Life' zu simulieren.&lt;br /&gt;
&lt;br /&gt;
Dazu wird zuerst eine Textur erstellt, die zufällig 'lebende'( weiß ) oder 'tote' ( schwarz ) Zellen enthält.&lt;br /&gt;
Diese Textur repräsentiert die Anfangspopulation.&lt;br /&gt;
&lt;br /&gt;
In jedem ( Render- )schritt wird die nachfolgende Population berechnet.&lt;br /&gt;
Abhängig davon, wieviel tote oder lebendige Nachbarzellen eine Zelle hat, wird entschieden ob die Zelle 'stirbt', am Leben bleibt oder eine neue Zelle geboren wird.&lt;br /&gt;
&lt;br /&gt;
Hat eine lebende Zelle 2 oder 3 Nachbarn überlebt sie, hat sie weniger als 2 verhungert sie, hat sie mehr als 3 stirbt sie wegen Überbevölkerung.&lt;br /&gt;
&lt;br /&gt;
Wenn eine leere Zelle von 3 lebendigen Zellen umgeben ist, wird dort eine  neue Zelle 'geboren'.&lt;br /&gt;
&lt;br /&gt;
In jedem Renderschritt wird nun also die Textur an den Fragmentshader übergeben ( gezeichnet auf einem Quad ) und dort wird dann die nächste Generation berechnet und auf den Bildschirm geschrieben ( mit [[glFinish]] ).&lt;br /&gt;
Mittels [[glCopyTexImage2D]] können die Daten wieder in die Textur geschrieben werden.&lt;br /&gt;
&lt;br /&gt;
==Besondere Vorraussetzungen==&lt;br /&gt;
OpenGL 2.0.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
Vertexshader&lt;br /&gt;
&amp;lt;source lang=&amp;quot;glsl&amp;quot;&amp;gt;void main()&lt;br /&gt;
{&lt;br /&gt;
    gl_TexCoord[0] = gl_MultiTexCoord0;&lt;br /&gt;
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fragmentshader&lt;br /&gt;
&amp;lt;source lang=&amp;quot;glsl&amp;quot;&amp;gt;uniform sampler2D Texture0;&lt;br /&gt;
&lt;br /&gt;
float SIZE = 64.0;&lt;br /&gt;
&lt;br /&gt;
int lookup( in float x, in float y )&lt;br /&gt;
{&lt;br /&gt;
    vec2 tc;&lt;br /&gt;
    tc.x = x/SIZE;&lt;br /&gt;
    tc.y = y/SIZE;&lt;br /&gt;
	&lt;br /&gt;
    vec4 col = texture2D(Texture0, tc);&lt;br /&gt;
	&lt;br /&gt;
    if ( col.r == 1.0 )&lt;br /&gt;
        return 1;&lt;br /&gt;
		&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
    float x = gl_FragCoord.x;&lt;br /&gt;
    float y = gl_FragCoord.y;&lt;br /&gt;
    int neighbours = 0;&lt;br /&gt;
	&lt;br /&gt;
    //Nachbarn berechnen&lt;br /&gt;
    if ( x &amp;gt; 0 &amp;amp;&amp;amp; y &amp;gt; 0 ) neighbours += lookup( x - 1, y - 1 );&lt;br /&gt;
    if ( y &amp;gt; 0 ) neighbours += lookup( x, y - 1 );&lt;br /&gt;
    if ( x &amp;lt; SIZE - 1 &amp;amp;&amp;amp; y &amp;gt; 0 ) neighbours += lookup( x + 1, y - 1 );&lt;br /&gt;
    if ( x &amp;gt; 0 ) neighbours += lookup( x - 1, y );&lt;br /&gt;
    if ( x &amp;lt; SIZE - 1 ) neighbours += lookup( x + 1, y );&lt;br /&gt;
    if ( x &amp;gt; 0 &amp;amp;&amp;amp; y &amp;lt; SIZE - 1 ) neighbours += lookup( x - 1, y + 1 );&lt;br /&gt;
    if ( y &amp;lt; SIZE - 1 ) neighbours += lookup( x, y + 1 );&lt;br /&gt;
    if ( x &amp;lt; SIZE - 1 &amp;amp;&amp;amp; y &amp;lt; SIZE - 1 ) neighbours += lookup( x + 1, y + 1 );&lt;br /&gt;
	&lt;br /&gt;
    //eigener Zustand&lt;br /&gt;
    int self = lookup( x, y );&lt;br /&gt;
	&lt;br /&gt;
    gl_FragColor = vec4(0);&lt;br /&gt;
	&lt;br /&gt;
    //hier wird entschieden, ob die Zelle lebt&lt;br /&gt;
    if ( neighbours == 3 || ( neighbours == 2 &amp;amp;&amp;amp; self == 1 ) )&lt;br /&gt;
    {&lt;br /&gt;
        gl_FragColor = vec4(1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dj3hut1</name></author>	</entry>

	</feed>