<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nathan&#039;s blog</title>
	<atom:link href="http://www.blog.nathanhaze.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.nathanhaze.com</link>
	<description>Coding, Web Design, and stuff I find interesting</description>
	<lastBuildDate>Fri, 18 May 2012 13:52:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Check out the android app I finished recently</title>
		<link>http://www.blog.nathanhaze.com/check-out-the-android-app-i-finished-recently/</link>
		<comments>http://www.blog.nathanhaze.com/check-out-the-android-app-i-finished-recently/#comments</comments>
		<pubDate>Fri, 18 May 2012 13:52:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=645</guid>
		<description><![CDATA[It is based upon the Drake Equation which estimate the number of detectable extraterrestrial civilizations in the Milky Way galaxy. It is pretty simple, but it is a start. Drake App Tweet This Post]]></description>
			<content:encoded><![CDATA[<p>It is based upon the Drake Equation which estimate the number of detectable extraterrestrial civilizations in the Milky Way galaxy. It is pretty simple, but it is a start.</p>
<p><a title="Drake App" href="https://play.google.com/store/apps/details?id=org.example.drake" target="_blank">Drake App</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Check+out+the+android+app+I+finished+recently+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D645" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Check+out+the+android+app+I+finished+recently+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D645" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/check-out-the-android-app-i-finished-recently/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PHP with MySQL examples</title>
		<link>http://www.blog.nathanhaze.com/using-php-with-mysql-examples/</link>
		<comments>http://www.blog.nathanhaze.com/using-php-with-mysql-examples/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 04:42:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=624</guid>
		<description><![CDATA[I will continue to add to the list. These are just some simple examples. Remember just put them in between php tags and place the code in a php file. All of them you will have to add your username, password, database and table name(except for view tables). Truncate a table This will erase all [...]]]></description>
			<content:encoded><![CDATA[<p>I will continue to add to the list. These are just some simple examples. Remember just put them in between php tags and place the code in a php file. All of them you will have to add your username, password, database and table name(except for view tables).</p>
<p><span id="more-624"></span></p>
<h2>Truncate a table</h2>
<p>This will erase all data in your table but keeps the structure.</p>
<pre>$host="localhost"; // Host name
$username=" "; // Mysql username
$password=" "; // Mysql password
$db_name=" "; // Database name
$tbl_name=" "; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql="TRUNCATE TABLE '$tbl_name' "; //might need to change the quotes
$result=mysql_query($sql) or trigger_error(mysql_error().$sql);
mysql_close();</pre>
<h2>Create a Table Example</h2>
<p>This assumes you already created a database.</p>
<pre>// Make a MySQL Connection
$con = mysql_connect("localhost", "user name", "password") or die(mysql_error());
mysql_select_db("database name") or die(mysql_error());

$sql = "CREATE TABLE newTableName
(
ID int NOT NULL AUTO_INCREMENT,
PRIMARY KEY(ID),
username varchar(20),
passwd char(40),
email  varchar(100),
facebookID varchar(20),
tweetID varchar(20),
about varchar(300)
)";

mysql_query($sql,$con);</pre>
<h2>View Table</h2>
<p>Scroll to the bottom see all the tables in your database. This is code produced from someone else. Props to that person.</p>
<p>Due to formatting issues I put it in a text file. </p>
<p><a href='http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/viewtables.txt'>viewtables.txt</a></p>
<h2> View Data in a table </h2>
<p><a href='http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/viewall.txt'>viewall.txt</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Using+PHP+with+MySQL+examples+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D624" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Using+PHP+with+MySQL+examples+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D624" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/using-php-with-mysql-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Select a Row in a MySQL Database using the URL</title>
		<link>http://www.blog.nathanhaze.com/how-to-select-a-row-in-a-mysql-database-using-the-url/</link>
		<comments>http://www.blog.nathanhaze.com/how-to-select-a-row-in-a-mysql-database-using-the-url/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 05:11:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=613</guid>
		<description><![CDATA[On a recent school project, we was making a website that had a social network element. After the user created his account and loged in, he could see his profile. This was useless because no one else could see it. I needed a way so that ever member had a unique URL.  So I created a [...]]]></description>
			<content:encoded><![CDATA[<p>On a recent school project, we was making a website that had a social network element. After the user created his account and loged in, he could see his profile. This was useless because no one else could see it. I needed a way so that ever member had a unique URL.  So I created a template that only information from the database to create the webpage. It is very simple to query a MySQL database using the URL.</p>
<p><span id="more-613"></span></p>
<p>First part is the URL:</p>
<pre>https://www.yourwebpage.com/yourPHPfile?id=yourVariable</pre>
<p>Here is a completed one that I used:</p>
<pre>http://pausrecords.com/members/memberSelect.php?id=group</pre>
<p>Here is the completed source code to use:<br />
<a href="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/memberSelect.txt">memberSelect</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+to+Select+a+Row+in+a+MySQL+Database+using+the+URL+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D613" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+to+Select+a+Row+in+a+MySQL+Database+using+the+URL+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D613" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/how-to-select-a-row-in-a-mysql-database-using-the-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a html form to pull up a member&#8217;s Facebook photo or Twitter Feed</title>
		<link>http://www.blog.nathanhaze.com/using-a-html-form-to-pull-up-a-members-facebook-photo/</link>
		<comments>http://www.blog.nathanhaze.com/using-a-html-form-to-pull-up-a-members-facebook-photo/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 04:42:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[website building]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=590</guid>
		<description><![CDATA[This is very vague, but I figure someone would want to do it out there. Even though they are very similar, I will show how to grab a Facebook profile photo first. My ID: 100000278497888 The example is based upon the idea that you can pull up anyone photo by using the url in a img tag [...]]]></description>
			<content:encoded><![CDATA[<p>This is very vague, but I figure someone would want to do it out there. Even though they are very similar, I will show how to grab a Facebook profile photo first.</p>
<p style="text-align: center;">My ID: 100000278497888</p>
<p><a href="http://www.blog.nathanhaze.com/demos/fbPhoto/facebookInput.html"><img class="aligncenter size-full wp-image-598" title="demo" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/demo.png" alt="" width="200" height="60" /></a><span id="more-590"></span><br />
The example is based upon the idea that you can pull up anyone photo by using the url in a img tag (not sure how to do this, check out example below):</p>
<pre>http://graph.facebook.com/ facebook ID  /picture?type=large</pre>
<p>So you easily insert the form data inside the url.  The data can be stored in a database or form data like I did.  The &#8216;type&#8217; can be changed to the size you want, square (50&#215;50), small (50 pixels wide, variable height), normal (100 pixels wide, variable height), and large (about 200 pixels wide, variable height).</p>
<p>&nbsp;</p>
<p>Check out the the code here:</p>
<p><a href="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/facebookInput.txt">facebookInput</a>   //change the file to  an html file instead of  txt file. This is called first.</p>
<p><a href="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/facebookOutput.txt">facebookOutput</a>  // change to php file. This is the php file that generates the photo .</p>
<p>&nbsp;</p>
<p>You can find more information <a href="http://developers.facebook.com/docs/reference/api/">here</a>.</p>
<p>&nbsp;</p>
<h2>Grab a Twitter Feed using a form</h2>
<p>This one is the same for the most part. In my code, I used PHP to get the form data then I converted the PHP variable to a JavaScript variable which you can see it in the source code. You should not have to do that, but I had a one track mind while writing it.</p>
<p><a href="http://www.blog.nathanhaze.com/demos/twitFeed/TwitterInput.html"><img class="aligncenter size-full wp-image-598" title="demo" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/demo.png" alt="" width="200" height="60" /></a></p>
<p>Here is the source code:</p>
<p><a href="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/TwitterInput.txt">TwitterInput</a>  // this is the form to insert your Twitter Handle. Same as before but a change in variable name. change to an HTML file(of course).</p>
<p><a href="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/TwitterOutput.txt">TwitterOutput</a>  // once again this is the php file (convert it before using) that does all the leg work. There is also an example on converting PHP variable to JavaScript variable inside.</p>
<p>More information, and to create your own Twitter plugin is found<a href="http://twitter.com/about/resources/widgets/widget_profile" target="_blank"> here. </a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Using+a+html+form+to+pull+up+a+member%E2%80%99s+Facebook+photo+or+Twitter+Feed+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D590" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Using+a+html+form+to+pull+up+a+member%E2%80%99s+Facebook+photo+or+Twitter+Feed+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D590" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/using-a-html-form-to-pull-up-a-members-facebook-photo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Very simple contact form</title>
		<link>http://www.blog.nathanhaze.com/very-simple-contact-form/</link>
		<comments>http://www.blog.nathanhaze.com/very-simple-contact-form/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 05:09:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[website building]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=565</guid>
		<description><![CDATA[Here is an example of using PHP with html form data to make a contact form for a web site. This is also a good example of grabbing HTML form data with PHP and using it.  Here is the demo: &#160; &#160; Here is the code: This is your form. You can add any form [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an example of using PHP with html form data to make a contact form for a web site. This is also a good example of grabbing HTML form data with PHP and using it.  Here is the demo:</p>
<p><a href="www.nathanhaze.com/feedback.html" target="_blank"><img class="alignleft size-full wp-image-567" title="demo" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/03/demo.png" alt="" width="200" height="60" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span id="more-565"></span></p>
<p>Here is the code:</p>
<p>This is your form. You can add any form tags you like. Change the extension to &#8216;html&#8217; instead of &#8216;txt&#8217; if you wanna try it.<br />
<a href="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/form.txt">form</a></p>
<p>Here what does the leg work. The main part of this file is the PHP code. For this to work for you, change the extension from &#8216;txt&#8217; to &#8216;php&#8217; then change the email address to your email.</p>
<p><a href="http://www.blog.nathanhaze.com/wp-content/uploads/2012/04/email.txt">email</a></p>
<p>Leave me any questions if your having trouble with it or want to comment on it.</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Very+simple+contact+form+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D565" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Very+simple+contact+form+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D565" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/very-simple-contact-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send a text to a friend from a website</title>
		<link>http://www.blog.nathanhaze.com/send-a-text-to-a-friend-from-a-website/</link>
		<comments>http://www.blog.nathanhaze.com/send-a-text-to-a-friend-from-a-website/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 04:38:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=561</guid>
		<description><![CDATA[I am working on a page to send text messages from the web.  I know there is a lot out there, but I hope to do a better job. Let me know if you have any request or comments. &#160; Send a Text  Tweet This Post]]></description>
			<content:encoded><![CDATA[<p>I am working on a page to send text messages from the web.  I know there is a lot out there, but I hope to do a better job. Let me know if you have any request or comments.</p>
<p>&nbsp;</p>
<p><a href="http://nathanhaze.com/textafriend/" target="_blank">Send a Text </a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Send+a+text+to+a+friend+from+a+website+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D561" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Send+a+text+to+a+friend+from+a+website+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D561" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/send-a-text-to-a-friend-from-a-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Central State Mental Hospital (Milledgeville, GA)</title>
		<link>http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/</link>
		<comments>http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 06:09:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=483</guid>
		<description><![CDATA[Traveling back from Savannah, GA we decided to swing by the Central State Hospital. Built in 1842 and peak population of 12,000 patients this place was a must see for me.  I was expecting a single large building but instead it was very large campus style layout. I was not able to find the graveyard [...]]]></description>
			<content:encoded><![CDATA[<p>Traveling back from Savannah, GA we decided to swing by the Central State Hospital. Built in 1842 and peak population of 12,000 patients this place was a must see for me.  I was expecting a single large building but instead it was very large campus style layout. I was not able to find the graveyard which they used numbers instead of name markers. Here the pictures from our trip, sorry I did not go inside.</p>
<p><span id="more-483"></span></p>

<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5744-2/' title='IMG_5744'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5744-150x150.jpg" class="attachment-thumbnail" alt="IMG_5744" title="IMG_5744" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5745-2/' title='IMG_5745'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5745-150x150.jpg" class="attachment-thumbnail" alt="IMG_5745" title="IMG_5745" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5746-2/' title='IMG_5746'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5746-150x150.jpg" class="attachment-thumbnail" alt="IMG_5746" title="IMG_5746" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5747-2/' title='IMG_5747'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5747-150x150.jpg" class="attachment-thumbnail" alt="IMG_5747" title="IMG_5747" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5748-2/' title='IMG_5748'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5748-150x150.jpg" class="attachment-thumbnail" alt="IMG_5748" title="IMG_5748" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5749-2/' title='IMG_5749'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5749-150x150.jpg" class="attachment-thumbnail" alt="IMG_5749" title="IMG_5749" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5750-2/' title='IMG_5750'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5750-150x150.jpg" class="attachment-thumbnail" alt="IMG_5750" title="IMG_5750" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5752-2/' title='IMG_5752'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5752-150x150.jpg" class="attachment-thumbnail" alt="IMG_5752" title="IMG_5752" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5753-2/' title='IMG_5753'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5753-150x150.jpg" class="attachment-thumbnail" alt="IMG_5753" title="IMG_5753" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5754-2/' title='IMG_5754'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5754-150x150.jpg" class="attachment-thumbnail" alt="IMG_5754" title="IMG_5754" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5756-2/' title='IMG_5756'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5756-150x150.jpg" class="attachment-thumbnail" alt="IMG_5756" title="IMG_5756" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5757-2/' title='IMG_5757'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5757-150x150.jpg" class="attachment-thumbnail" alt="IMG_5757" title="IMG_5757" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5758-2/' title='IMG_5758'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5758-150x150.jpg" class="attachment-thumbnail" alt="IMG_5758" title="IMG_5758" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5759-2/' title='IMG_5759'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5759-150x150.jpg" class="attachment-thumbnail" alt="IMG_5759" title="IMG_5759" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5760-2/' title='IMG_5760'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5760-150x150.jpg" class="attachment-thumbnail" alt="IMG_5760" title="IMG_5760" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5761-2/' title='IMG_5761'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5761-150x150.jpg" class="attachment-thumbnail" alt="IMG_5761" title="IMG_5761" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5762-2/' title='IMG_5762'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5762-150x150.jpg" class="attachment-thumbnail" alt="IMG_5762" title="IMG_5762" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5763-2/' title='IMG_5763'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5763-150x150.jpg" class="attachment-thumbnail" alt="IMG_5763" title="IMG_5763" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5765-2/' title='IMG_5765'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5765-150x150.jpg" class="attachment-thumbnail" alt="IMG_5765" title="IMG_5765" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5766-2/' title='IMG_5766'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5766-150x150.jpg" class="attachment-thumbnail" alt="IMG_5766" title="IMG_5766" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5767-2/' title='IMG_5767'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5767-150x150.jpg" class="attachment-thumbnail" alt="IMG_5767" title="IMG_5767" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5769-2/' title='IMG_5769'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5769-150x150.jpg" class="attachment-thumbnail" alt="IMG_5769" title="IMG_5769" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5770-2/' title='IMG_5770'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5770-150x150.jpg" class="attachment-thumbnail" alt="IMG_5770" title="IMG_5770" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5771-2/' title='IMG_5771'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5771-150x150.jpg" class="attachment-thumbnail" alt="IMG_5771" title="IMG_5771" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5772-2/' title='IMG_5772'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5772-150x150.jpg" class="attachment-thumbnail" alt="IMG_5772" title="IMG_5772" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5773-2/' title='IMG_5773'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5773-150x150.jpg" class="attachment-thumbnail" alt="IMG_5773" title="IMG_5773" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5774-2/' title='IMG_5774'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5774-150x150.jpg" class="attachment-thumbnail" alt="IMG_5774" title="IMG_5774" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5775-2/' title='IMG_5775'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5775-150x150.jpg" class="attachment-thumbnail" alt="IMG_5775" title="IMG_5775" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5777-2/' title='IMG_5777'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5777-150x150.jpg" class="attachment-thumbnail" alt="IMG_5777" title="IMG_5777" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5778-2/' title='IMG_5778'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5778-150x150.jpg" class="attachment-thumbnail" alt="IMG_5778" title="IMG_5778" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5779-2/' title='IMG_5779'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5779-150x150.jpg" class="attachment-thumbnail" alt="IMG_5779" title="IMG_5779" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5780-2/' title='IMG_5780'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5780-150x150.jpg" class="attachment-thumbnail" alt="IMG_5780" title="IMG_5780" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5782-2/' title='IMG_5782'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5782-150x150.jpg" class="attachment-thumbnail" alt="IMG_5782" title="IMG_5782" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5783-2/' title='IMG_5783'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5783-150x150.jpg" class="attachment-thumbnail" alt="IMG_5783" title="IMG_5783" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5784-2/' title='IMG_5784'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5784-150x150.jpg" class="attachment-thumbnail" alt="IMG_5784" title="IMG_5784" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5785-2/' title='IMG_5785'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5785-150x150.jpg" class="attachment-thumbnail" alt="IMG_5785" title="IMG_5785" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5788-2/' title='IMG_5788'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5788-150x150.jpg" class="attachment-thumbnail" alt="IMG_5788" title="IMG_5788" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5789-2/' title='IMG_5789'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5789-150x150.jpg" class="attachment-thumbnail" alt="IMG_5789" title="IMG_5789" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5791-2/' title='IMG_5791'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5791-150x150.jpg" class="attachment-thumbnail" alt="IMG_5791" title="IMG_5791" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5793-2/' title='IMG_5793'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5793-150x150.jpg" class="attachment-thumbnail" alt="IMG_5793" title="IMG_5793" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5797-2/' title='IMG_5797'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5797-150x150.jpg" class="attachment-thumbnail" alt="IMG_5797" title="IMG_5797" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5800-2/' title='IMG_5800'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5800-150x150.jpg" class="attachment-thumbnail" alt="IMG_5800" title="IMG_5800" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5801-2/' title='IMG_5801'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5801-150x150.jpg" class="attachment-thumbnail" alt="IMG_5801" title="IMG_5801" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5802-2/' title='IMG_5802'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5802-150x150.jpg" class="attachment-thumbnail" alt="IMG_5802" title="IMG_5802" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5803-2/' title='IMG_5803'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5803-150x150.jpg" class="attachment-thumbnail" alt="IMG_5803" title="IMG_5803" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5805-2/' title='IMG_5805'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5805-150x150.jpg" class="attachment-thumbnail" alt="IMG_5805" title="IMG_5805" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5806-2/' title='IMG_5806'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5806-150x150.jpg" class="attachment-thumbnail" alt="IMG_5806" title="IMG_5806" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5807-2/' title='IMG_5807'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5807-150x150.jpg" class="attachment-thumbnail" alt="IMG_5807" title="IMG_5807" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5808-2/' title='IMG_5808'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5808-150x150.jpg" class="attachment-thumbnail" alt="IMG_5808" title="IMG_5808" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5809-2/' title='IMG_5809'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5809-150x150.jpg" class="attachment-thumbnail" alt="IMG_5809" title="IMG_5809" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5811-2/' title='IMG_5811'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5811-150x150.jpg" class="attachment-thumbnail" alt="IMG_5811" title="IMG_5811" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5812-2/' title='IMG_5812'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5812-150x150.jpg" class="attachment-thumbnail" alt="IMG_5812" title="IMG_5812" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5813-2/' title='IMG_5813'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5813-150x150.jpg" class="attachment-thumbnail" alt="IMG_5813" title="IMG_5813" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5755-2/' title='IMG_5755'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5755-150x150.jpg" class="attachment-thumbnail" alt="IMG_5755" title="IMG_5755" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5751-2/' title='IMG_5751'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5751-150x150.jpg" class="attachment-thumbnail" alt="IMG_5751" title="IMG_5751" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5804-2/' title='IMG_5804'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5804-150x150.jpg" class="attachment-thumbnail" alt="IMG_5804" title="IMG_5804" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5810-2/' title='IMG_5810'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5810-150x150.jpg" class="attachment-thumbnail" alt="IMG_5810" title="IMG_5810" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5787-2/' title='IMG_5787'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5787-150x150.jpg" class="attachment-thumbnail" alt="IMG_5787" title="IMG_5787" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5786-2/' title='IMG_5786'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5786-150x150.jpg" class="attachment-thumbnail" alt="IMG_5786" title="IMG_5786" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5776-2/' title='IMG_5776'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5776-150x150.jpg" class="attachment-thumbnail" alt="IMG_5776" title="IMG_5776" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5795-2/' title='IMG_5795'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5795-150x150.jpg" class="attachment-thumbnail" alt="IMG_5795" title="IMG_5795" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5794-2/' title='IMG_5794'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5794-150x150.jpg" class="attachment-thumbnail" alt="IMG_5794" title="IMG_5794" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5790-2/' title='IMG_5790'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5790-150x150.jpg" class="attachment-thumbnail" alt="IMG_5790" title="IMG_5790" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5781-2/' title='IMG_5781'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5781-150x150.jpg" class="attachment-thumbnail" alt="IMG_5781" title="IMG_5781" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5768-2/' title='IMG_5768'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5768-150x150.jpg" class="attachment-thumbnail" alt="IMG_5768" title="IMG_5768" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5764-2/' title='IMG_5764'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5764-150x150.jpg" class="attachment-thumbnail" alt="IMG_5764" title="IMG_5764" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5799-2/' title='IMG_5799'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5799-150x150.jpg" class="attachment-thumbnail" alt="IMG_5799" title="IMG_5799" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5798-2/' title='IMG_5798'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5798-150x150.jpg" class="attachment-thumbnail" alt="IMG_5798" title="IMG_5798" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5796-2/' title='IMG_5796'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5796-150x150.jpg" class="attachment-thumbnail" alt="IMG_5796" title="IMG_5796" /></a>
<a href='http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/img_5792-2/' title='IMG_5792'><img width="150" height="150" src="http://www.blog.nathanhaze.com/wp-content/uploads/2012/02/IMG_5792-150x150.jpg" class="attachment-thumbnail" alt="IMG_5792" title="IMG_5792" /></a>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>More Information:</p>
<p><a href="http://www.georgiaencyclopedia.org/nge/Article.jsp?id=h-1222" target="_blank">Central State Hospital</a></p>
<p><a href="http://kingstonlounge.blogspot.com/2009/09/central-state-hospital-milledgeville-ga.html" target="_blank">Great photos of the inside</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Central+State+Mental+Hospital+%28Milledgeville%2C+GA%29+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D483" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Central+State+Mental+Hospital+%28Milledgeville%2C+GA%29+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D483" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/central-state-mental-hospital-milledgeville-ga/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GLSL Bump Mapping</title>
		<link>http://www.blog.nathanhaze.com/glsl-bump-mapping/</link>
		<comments>http://www.blog.nathanhaze.com/glsl-bump-mapping/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 05:29:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[GLSL]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=391</guid>
		<description><![CDATA[This is my last post on GLSL. To tell the truth after all these post on GLSL I do not fully understand it. Either way here is bump mapping using GLSL. To make more sense of bump mapping here is an except from my project. Bump mapping is an alternative to normal mapping in that [...]]]></description>
			<content:encoded><![CDATA[<p>This is my last post on GLSL. To tell the truth after all these post on GLSL I do not fully understand it. Either way here is bump mapping using GLSL. To make more sense of bump mapping here is an except from my project.</p>
<blockquote><p>Bump mapping is an alternative to normal mapping in that it uses a grayscale height map instead of an RGB map. The height map determines how high something is. However, we won’t be actually moving any vertices. Like normal mapping, we will only change the normals.</p>
<p>As you may recall, the normal is perpendicular to the surface underneath. Another way to put it is that the normal is perpendicular to the tangent of the surface. Hence, we need to first calculate two tangents. To calculate a tangent, we need to know the height value just above and below (or to the left and to the right) of the current position. We can offset the texture coordinates in four different ways and use these offsets in four calls to texture2D. Note, for some maps, you may need to fiddle with this offset value to get something right (….this is probably why normal mapping is more prevalent in industry….). Once you have the two tangents, simply cross them and normalize to get the new normal.</p></blockquote>
<div id="attachment_392" class="wp-caption aligncenter" style="width: 256px"><a href="http://www.blog.nathanhaze.com/wp-content/uploads/2011/12/bump-mapping.png"><img class="size-medium wp-image-392" title="bump mapping" src="http://www.blog.nathanhaze.com/wp-content/uploads/2011/12/bump-mapping-246x300.png" alt="" width="246" height="300" /></a><p class="wp-caption-text">I changed the camera angle to show the bumps better.</p></div>
<p><span id="more-391"></span></p>
<p>&nbsp;</p>
<h2> Vert Shader </h2>
<pre>uniform sampler2D my_color_texture;
varying vec2 texture_coord;

varying vec3 normal;
varying vec3 vertex_to_light;
varying vec3 vertex_to_camera;

void main()
{	 

  gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

  normal = normalize(gl_NormalMatrix * gl_Normal);

  vec4 vertex_modelview = gl_ModelViewMatrix * gl_Vertex;

  vertex_to_light = gl_LightSource[0].position.xyz - vertex_modelview.xyz;

  vertex_to_camera = -vertex_modelview.xyz; 

  texture_coord = vec2 (gl_MultiTexCoord0);

} </pre>
<h2> Frag Shader </h2>
<pre>
uniform sampler2D my_color_texture;

varying vec2 texture_coord;

varying vec3 normal;
varying vec3 vertex_to_light;
varying vec3 vertex_to_camera;

const float specularpower = 25.0;

const float off = 0.005;
const float falloff = 70.0;

void main()
{
  vec4 diffuse_color = vec4(0.0, 0.5, 1.0, 1.0);
  vec4 specular_color = vec4(1.0, 1.0, 1.0, 1.0);

  vec3 n_normal = normalize(normal);

  vec3 n_vertex_to_light = normalize(vertex_to_light);
  float diffuse = clamp (dot (n_normal, n_vertex_to_light), 0.0, 1.0);

  vec3 n_vertex_to_camera = normalize(vertex_to_camera);
  vec3 ref = reflect(-n_vertex_to_light, n_normal);

  float specular = clamp(dot (n_vertex_to_camera, ref), 0.0, 1.0);
  specular = pow(specular, specularpower);

  gl_FragColor.xyz = diffuse * diffuse_color.rgb + specular * specular_color.rgb;
  gl_FragColor.a = 1.0;
}
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=GLSL+Bump+Mapping+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D391" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=GLSL+Bump+Mapping+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D391" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/glsl-bump-mapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GLSL Normal Mapping</title>
		<link>http://www.blog.nathanhaze.com/glsl-normal-mapping/</link>
		<comments>http://www.blog.nathanhaze.com/glsl-normal-mapping/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 04:48:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[GLSL]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=387</guid>
		<description><![CDATA[Here is my version of GLSL Normal Mapping. A normal map is an RGB texture where the RGB value corresponds to the XYZ of the normal. Since we are only doing mapping onto a quad, we simply need to replace (not offset) the old normal with this new read normal. There is one caveat, however. [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my version of GLSL Normal Mapping. A normal map is an RGB texture where the RGB value corresponds to the XYZ of the normal. Since we are only doing mapping onto a quad, we simply need to replace (not offset) the old normal with this new read normal. There is one caveat, however. RGB values range from [0,1] while normal directional values can range from [-1,1]. The same should go for green and blue.</p>
<p>I tried to do Blinn-Phong reflection but i am not sure if it is correct.</p>
<p><a href="http://www.blog.nathanhaze.com/wp-content/uploads/2011/12/normal-mapping.png"><img src="http://www.blog.nathanhaze.com/wp-content/uploads/2011/12/normal-mapping-300x300.png" alt="" title="normal mapping" width="300" height="300" class="aligncenter size-medium wp-image-388" /></a></p>
<p><span id="more-387"></span></p>
<h2>Vert Shader </h2>
<pre>

uniform sampler2D my_color_texture;
varying vec2 texture_coord;

varying vec3 normal;
varying vec3 vertex_to_light;
varying vec3 vertex_to_camera;

void main()
{
  gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

  normal = normalize(gl_NormalMatrix * gl_Normal);

  vec4 vertex_modelview = gl_ModelViewMatrix * gl_Vertex;

  vertex_to_light = gl_LightSource[0].position.xyz - vertex_modelview.xyz;

  vertex_to_camera = -vertex_modelview.xyz; 

  texture_coord = vec2 (gl_MultiTexCoord0);

}
</pre>
<h2 Frag Shader </h2>
<pre>
uniform sampler2D my_color_texture;

varying vec2 texture_coord;

varying vec3 normal;
varying vec3 vertex_to_light;
varying vec3 vertex_to_camera;

const float specularpower = 25.0;

void main()
{

  vec3 n_normal = 2.0 * texture2D (my_color_texture, texture_coord).rgb - 1.0;

  n_normal = vec3(n_normal.x * 2.0 - 1.0, n_normal.y * 2.0 - 1.0 , n_normal.z * 2.0 - 1.0);

  n_normal = normalize(n_normal);

  vec4 diffuse_color = vec4(0.0, 0.5, 1.0, 1.0) ;
  vec4 specular_color = vec4(1.0, 1.0, 1.0, 1.0)  ;

  vec3 halfvector = normalize(vertex_to_light + vertex_to_camera);

  vec3 n_vertex_to_light = normalize(vertex_to_light);
  float diffuse = max (dot (n_normal, n_vertex_to_light), 0.0);

  vec3 n_vertex_to_camera = normalize(vertex_to_camera);
  vec3 ref = reflect(-n_vertex_to_light, n_normal);

  float specular = max(dot (n_normal, halfvector), 0.0);
  specular = pow(specular, specularpower);

 gl_FragColor.xyz = diffuse * diffuse_color.rgb + specular * specular_color.rgb;

gl_FragColor.a = 1.0;

}
</pre>
<p>&nbsp;</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=GLSL+Normal+Mapping+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D387" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=GLSL+Normal+Mapping+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D387" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/glsl-normal-mapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GLSL Desert Mirage/Heat Wave Effect</title>
		<link>http://www.blog.nathanhaze.com/glsl-desert-mirageheat-wave-effect/</link>
		<comments>http://www.blog.nathanhaze.com/glsl-desert-mirageheat-wave-effect/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 03:34:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[GLSL]]></category>

		<guid isPermaLink="false">http://www.blog.nathanhaze.com/?p=381</guid>
		<description><![CDATA[Here is another GLSL code sample from my project. This one was fairly easy after they gave us the formula to use. Here is the code and image of the results. Vert Shader uniform sampler2D my_color_texture; uniform float time; varying vec2 texc; void main() { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; texc = vec2(gl_MultiTexCoord0); } Frag [...]]]></description>
			<content:encoded><![CDATA[<p>Here is another GLSL code sample from my project. This one was fairly easy after they gave us the formula to use. Here is the code and image of the results.</p>
<p><a href="http://www.blog.nathanhaze.com/wp-content/uploads/2011/12/mirage.png"><img class="aligncenter size-medium wp-image-382" title="mirage" src="http://www.blog.nathanhaze.com/wp-content/uploads/2011/12/mirage-273x300.png" alt="" width="273" height="300" /></a><br />
<span id="more-381"></span></p>
<h2>Vert Shader</h2>
<pre>uniform sampler2D my_color_texture;
uniform float time;
varying vec2 texc;

void main()
{
  gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
  texc = vec2(gl_MultiTexCoord0);
}</pre>
<h2>Frag Shader</h2>
<pre>varying vec2 texc;
uniform sampler2D my_color_texture;
uniform float time;

const float A = 0.03;
const float B = 200.0;
const float C = 5.0;

const float D = 0.003;
const float E = 13.0;
const float F = 9.0;
float x;
float y;

void main()
{
  gl_FragColor =  texture2D(my_color_texture, texc);
  gl_FragColor.a = 1.0; //Best to make sure nothing seems transparent
  float x =  A * sin(B * texc.x) * sin(C * time);
  float y =  D * sin(E * texc.y) * sin(F * time);
  vec2 c = vec2(texc.x + x, texc.y +y);
  vec4 diffuse_color =  texture2D(my_color_texture, c);
  gl_FragColor = diffuse_color;
}</pre>
<p>Mess with the variables to get different affects.</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=GLSL+Desert+Mirage%2FHeat+Wave+Effect+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D381" title="Post to Twitter"><img class="nothumb" src="http://www.blog.nathanhaze.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=GLSL+Desert+Mirage%2FHeat+Wave+Effect+http%3A%2F%2Fblog.nathanhaze.com%2F%3Fp%3D381" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.blog.nathanhaze.com/glsl-desert-mirageheat-wave-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

