<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Home</title>
	<atom:link href="http://www.swiftless.com/index.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.swiftless.com</link>
	<description>Game Programming and Computer Graphics Tutorials</description>
	<lastBuildDate>Wed, 01 Feb 2012 09:19:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Cintya</title>
		<link>http://www.swiftless.com/comment-page-1#comment-3351</link>
		<dc:creator>Cintya</dc:creator>
		<pubDate>Sun, 27 Nov 2011 02:39:52 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-3351</guid>
		<description>Hi,

I have been working on refractions too. I have been using opengl 3.3 and I tried to compute the refracted ray using the glm library (glm::refract). I&#039;m trying to make my model partly transparent.

For generating the refracted ray:

Ray Compute_refraction(int hitId, float t)
{
        const float airIndex = 1.0003f;
        const float glassIndex = 1.5000f;
        const float refractiveIndex = airIndex/glassIndex; 
        Ray refracted;
        glm::vec3 v1 = T[hitId].p2 - T[hitId].p1;
        glm::vec3 v2 = T[hitId].p3 - T[hitId].p1;
        glm::vec3 tri_norm = -glm::normalize(glm::cross(v1,v2));
        glm::vec3 PI = ray_r.ray_o + t*ray_r.ray_d;
        refracted.ray_o = PI;
        refracted.ray_d = glm::normalize(glm::refract(ray_r.ray_d,tri_norm,refractiveIndex));
        refracted.tMin = 0.0f;
        refracted.tMax = 1000000.0f;
        
        return refracted;
}


where ray is:


struct Ray{

        glm::vec3 ray_o;
        glm::vec3 ray_d;
        float tMin;
        float tMax;
}ray_r;

// create a Triangle
typedef struct 
{
        glm::vec3 p1;
        glm::vec3 p2;
        glm::vec3 p3;
        glm::vec2 texCoord1;
        glm::vec2 texCoord2;
        glm::vec2 texCoord3;
        unsigned int matIndex1;
        
}triangle;
vector T;


I&#039;m trying to compute the transparency when the rays intersect with the model. Can you help me with it    

thanks
Cintya</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have been working on refractions too. I have been using opengl 3.3 and I tried to compute the refracted ray using the glm library (glm::refract). I&#8217;m trying to make my model partly transparent.</p>
<p>For generating the refracted ray:</p>
<p>Ray Compute_refraction(int hitId, float t)<br />
{<br />
        const float airIndex = 1.0003f;<br />
        const float glassIndex = 1.5000f;<br />
        const float refractiveIndex = airIndex/glassIndex;<br />
        Ray refracted;<br />
        glm::vec3 v1 = T[hitId].p2 &#8211; T[hitId].p1;<br />
        glm::vec3 v2 = T[hitId].p3 &#8211; T[hitId].p1;<br />
        glm::vec3 tri_norm = -glm::normalize(glm::cross(v1,v2));<br />
        glm::vec3 PI = ray_r.ray_o + t*ray_r.ray_d;<br />
        refracted.ray_o = PI;<br />
        refracted.ray_d = glm::normalize(glm::refract(ray_r.ray_d,tri_norm,refractiveIndex));<br />
        refracted.tMin = 0.0f;<br />
        refracted.tMax = 1000000.0f;</p>
<p>        return refracted;<br />
}</p>
<p>where ray is:</p>
<p>struct Ray{</p>
<p>        glm::vec3 ray_o;<br />
        glm::vec3 ray_d;<br />
        float tMin;<br />
        float tMax;<br />
}ray_r;</p>
<p>// create a Triangle<br />
typedef struct<br />
{<br />
        glm::vec3 p1;<br />
        glm::vec3 p2;<br />
        glm::vec3 p3;<br />
        glm::vec2 texCoord1;<br />
        glm::vec2 texCoord2;<br />
        glm::vec2 texCoord3;<br />
        unsigned int matIndex1;</p>
<p>}triangle;<br />
vector T;</p>
<p>I&#8217;m trying to compute the transparency when the rays intersect with the model. Can you help me with it    </p>
<p>thanks<br />
Cintya</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nic_0</title>
		<link>http://www.swiftless.com/comment-page-1#comment-2660</link>
		<dc:creator>Nic_0</dc:creator>
		<pubDate>Sun, 30 Oct 2011 23:50:10 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-2660</guid>
		<description>Wellcome back! 
Nice design btw. :)</description>
		<content:encoded><![CDATA[<p>Wellcome back!<br />
Nice design btw. <img src='http://www.swiftless.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zaqi</title>
		<link>http://www.swiftless.com/comment-page-1#comment-1823</link>
		<dc:creator>zaqi</dc:creator>
		<pubDate>Wed, 22 Jun 2011 15:37:13 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-1823</guid>
		<description>[Basic Question] I want to create pool, can you show the simple code to show the water animation or whatever to show the water, please. Thanks b4</description>
		<content:encoded><![CDATA[<p>[Basic Question] I want to create pool, can you show the simple code to show the water animation or whatever to show the water, please. Thanks b4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zaqi</title>
		<link>http://www.swiftless.com/comment-page-1#comment-1822</link>
		<dc:creator>zaqi</dc:creator>
		<pubDate>Wed, 22 Jun 2011 15:36:29 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-1822</guid>
		<description>I want to create pool how can you show the simple code to show the water animation or whatever to show the water, please. Thanks b4</description>
		<content:encoded><![CDATA[<p>I want to create pool how can you show the simple code to show the water animation or whatever to show the water, please. Thanks b4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark LeMoine</title>
		<link>http://www.swiftless.com/comment-page-1#comment-1754</link>
		<dc:creator>Mark LeMoine</dc:creator>
		<pubDate>Fri, 10 Jun 2011 17:59:03 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-1754</guid>
		<description>Looks slick, thanks for the update, and looking forward to your future updates!</description>
		<content:encoded><![CDATA[<p>Looks slick, thanks for the update, and looking forward to your future updates!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maxnb</title>
		<link>http://www.swiftless.com/comment-page-1#comment-1748</link>
		<dc:creator>maxnb</dc:creator>
		<pubDate>Thu, 09 Jun 2011 13:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-1748</guid>
		<description>Also I&#039;d like to request an extended tutorial to openGL texture coordinate generation where you explain what these really are:
GL_TEXTURE_GEN_S
GL_TEXTURE_GEN_R
GL_TEXTURE_GEN_T
GL_TEXTURE_GEN_Q

and do the texture coordinate generation in the GLSL shader instead. If you can do that I&#039;d appreicate it since its my understanding that openGL 3 does not support texture generation thru fixed pipeline anymore or does it? In that case it needs to be done in the shader. I&#039;d appreciate if you explained more about this in tutorial or even responding here would be fine! :)</description>
		<content:encoded><![CDATA[<p>Also I&#8217;d like to request an extended tutorial to openGL texture coordinate generation where you explain what these really are:<br />
GL_TEXTURE_GEN_S<br />
GL_TEXTURE_GEN_R<br />
GL_TEXTURE_GEN_T<br />
GL_TEXTURE_GEN_Q</p>
<p>and do the texture coordinate generation in the GLSL shader instead. If you can do that I&#8217;d appreicate it since its my understanding that openGL 3 does not support texture generation thru fixed pipeline anymore or does it? In that case it needs to be done in the shader. I&#8217;d appreciate if you explained more about this in tutorial or even responding here would be fine! <img src='http://www.swiftless.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maxnb</title>
		<link>http://www.swiftless.com/comment-page-1#comment-1747</link>
		<dc:creator>maxnb</dc:creator>
		<pubDate>Thu, 09 Jun 2011 12:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-1747</guid>
		<description>your previous theme was much better, I&#039;m gonna miss it :)</description>
		<content:encoded><![CDATA[<p>your previous theme was much better, I&#8217;m gonna miss it <img src='http://www.swiftless.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vikki Hartup</title>
		<link>http://www.swiftless.com/comment-page-1#comment-1704</link>
		<dc:creator>Vikki Hartup</dc:creator>
		<pubDate>Thu, 02 Jun 2011 13:10:32 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-1704</guid>
		<description>Great source, thanks!</description>
		<content:encoded><![CDATA[<p>Great source, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad Mubasher</title>
		<link>http://www.swiftless.com/comment-page-1#comment-1703</link>
		<dc:creator>Muhammad Mubasher</dc:creator>
		<pubDate>Thu, 02 Jun 2011 10:11:53 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?page_id=52#comment-1703</guid>
		<description>Great Work... really great work. i take lot of help from your tutorials. i start openGl just a week ago.. and your tutorials totally help me in building basics of openGl.by help Of God i will go further in OpenGl..But In this field i remember your tutorials. May god help you .Great Work keep it up.</description>
		<content:encoded><![CDATA[<p>Great Work&#8230; really great work. i take lot of help from your tutorials. i start openGl just a week ago.. and your tutorials totally help me in building basics of openGl.by help Of God i will go further in OpenGl..But In this field i remember your tutorials. May god help you .Great Work keep it up.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

