<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>cocos2d for iPhone &#187; Tag: tilemap - Recent Posts</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/tilemap</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Sat, 31 Jul 2010 07:55:58 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/tags/tilemap" rel="self" type="application/rss+xml" />

		<item>
			<title>CJ on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48475</link>
			<pubDate>Fri, 30 Jul 2010 21:21:44 +0000</pubDate>
			<dc:creator>CJ</dc:creator>
			<guid isPermaLink="false">48475@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/26'&#62;Metric&#60;/a&#62; I see your point. I started doing some testing based on Apple's GLSprite example here&#60;br /&#62;
&#60;a href=&#34;https://developer.apple.com/iphone/library/samplecode/GLSprite/Introduction/Intro.html&#34; rel=&#34;nofollow&#34;&#62;https://developer.apple.com/iphone/library/samplecode/GLSprite/Introduction/Intro.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I'm building up from that using the same texture and projection settings that cocos2d uses and manually adding support for texture atlas one step at a time until I can reproduce the issue. If I cannot reproduce the issue then it must be something else in cocos2d that is introducing the problem.&#60;/p&#62;
&#60;p&#62;Stay tuned...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Metric on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48462</link>
			<pubDate>Fri, 30 Jul 2010 19:43:33 +0000</pubDate>
			<dc:creator>Metric</dc:creator>
			<guid isPermaLink="false">48462@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@CJ: Yes, the texture can wrap, but it still doesn't make sense to put it at the center of a pixel. It shouldn't have artifacts when mapping from 0 to 1 in direct relation to the pixels. &#60;/p&#62;
&#60;p&#62;Basically, there is something else going on in the cocos2d engine dealing with creating the textures for the sprites / compressing / uncompressing. It could even be the hardware of the iphone interfering with compression / uncompression. However, I have a feeling it is more to do with the actual compression / uncompression / converting algorithms in cocos2D.&#60;/p&#62;
&#60;p&#62;What I am saying is, you are applying a fix, but not to the real issue behind the problem. Your fix is more of a bandage then a direct stitching of the real problem.&#60;/p&#62;
&#60;p&#62;You also should not have artifacts in the textures in the 3D Projection if the texture is being created properly / uncompressed. &#60;/p&#62;
&#60;p&#62;I have yet to experience this artifact issue / flickering in the Java version I am working on, on my desktop or laptop. It is still using the direct 0,0 to 1,1 mapping. Of course, I am using the built in bufferedImage object in Java when converting to ARGB, RGB, RGBA, RBG, etc. Also, I am using pngs to test with.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>marcotronic on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48461</link>
			<pubDate>Fri, 30 Jul 2010 19:41:52 +0000</pubDate>
			<dc:creator>marcotronic</dc:creator>
			<guid isPermaLink="false">48461@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;Thanks a lot, CJ. You are right. In my test project it actually works but in my &#34;real&#34; project this has no effect... I have to check the differences... (As it didn´t work in my real project I didn´t set it in my test project because I thought it just wouldn´t work...)&#60;/p&#62;
&#60;p&#62;Marco
&#60;/p&#62;</description>
		</item>
		<item>
			<title>CJ on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48457</link>
			<pubDate>Fri, 30 Jul 2010 19:17:23 +0000</pubDate>
			<dc:creator>CJ</dc:creator>
			<guid isPermaLink="false">48457@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/388'&#62;marcotronic&#60;/a&#62; I tested your project and it does show the artifact you describe. But upon setting the projection matrix to 2D (&#60;a href=&#34;http://www.cocos2d-iphone.org/forum/topic/5760&#34;&#62;as Steve Oldmeadow pointed out in that other post&#60;/a&#62;) it solves the issue.&#60;/p&#62;
&#60;p&#62;So, just add this after you get a reference to the shared director in your app delegate:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[director setProjection:CCDirectorProjection2D];&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>marcotronic on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48451</link>
			<pubDate>Fri, 30 Jul 2010 18:53:23 +0000</pubDate>
			<dc:creator>marcotronic</dc:creator>
			<guid isPermaLink="false">48451@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@CJ: I´ve seen your posting after posting my example... Thanks a ton in advance for looking at it! That 2DProjector stuff didn´t help... In my little test project posted above I don´t use it.&#60;/p&#62;
&#60;p&#62;Marco
&#60;/p&#62;</description>
		</item>
		<item>
			<title>marcotronic on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48450</link>
			<pubDate>Fri, 30 Jul 2010 18:51:43 +0000</pubDate>
			<dc:creator>marcotronic</dc:creator>
			<guid isPermaLink="false">48450@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I´ve isolated the issue in a small project:&#60;/p&#62;
&#60;p&#62;The artifacts show like in my examples above:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.marcotronic.com/forums/ArtifactTest.zip&#34; rel=&#34;nofollow&#34;&#62;http://www.marcotronic.com/forums/ArtifactTest.zip&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Any ideas? &#60;/p&#62;
&#60;p&#62;Thanks a lot...&#60;/p&#62;
&#60;p&#62;Marco&#60;/p&#62;
&#60;p&#62;PS: I know the framerate is very low (due to the sprite as background image) but in my &#34;real&#34; project I use that trick with placing an empty sprite first and adding a child with the actual backgorund image with speeds up the FPS again... But the issue shows either way...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>CJ on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48449</link>
			<pubDate>Fri, 30 Jul 2010 18:48:01 +0000</pubDate>
			<dc:creator>CJ</dc:creator>
			<guid isPermaLink="false">48449@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/388'&#62;marcotronic&#60;/a&#62; The issue you describe sounds similar to this post:&#60;br /&#62;
&#60;a href=&#34;http://www.cocos2d-iphone.org/forum/topic/5760&#34; rel=&#34;nofollow&#34;&#62;http://www.cocos2d-iphone.org/forum/topic/5760&#60;/a&#62;&#60;br /&#62;
But he said that setting a 2D projection fixed the issue. Can you upload a simple project that just replicates the issue? I'll take a look at it to try to fix it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>marcotronic on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48442</link>
			<pubDate>Fri, 30 Jul 2010 18:02:18 +0000</pubDate>
			<dc:creator>marcotronic</dc:creator>
			<guid isPermaLink="false">48442@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I don´t know if my problem is the same issue but even after updating to the latest development branch from git I´m still getting strange artifacts when using sprites. I want to display them crisp and clean, so I set the AliasTexture param for them:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[sprite.texture setAliasTexParameters];&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I also changed that subpixel stuff (set it to 0) in ccConfig.h (for node and spritebatchnode). I tried &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[CCDirector setDirectorType:CCDirectorProjection2D]&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;It all didn´t help. This is how my sprites look (normal and with artifacts, 2 x magnified to see the issue better)&#60;/p&#62;
&#60;p&#62;&#60;img src=&#34;http://www.marcotronic.com/forums/artifacts.png&#34; alt=&#34;&#34; /&#62;&#60;/p&#62;
&#60;p&#62;I also tried different positions on screen, different sizes. No matter what I do - nothing helps... I´m getting nuts...&#60;/p&#62;
&#60;p&#62;Thanks for any help!&#60;br /&#62;
Marco&#60;/p&#62;
&#60;p&#62;PS: EDIT: Same issue with 0.99.5 beta - just tested some seconds ago... It really looks as if the sprites are resized a bit or something like that...&#60;/p&#62;
&#60;p&#62;PPS: Don´t know if it matters - it´s an iPad only project. So the issue displays on an iPad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hm50 on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48424</link>
			<pubDate>Fri, 30 Jul 2010 16:06:27 +0000</pubDate>
			<dc:creator>hm50</dc:creator>
			<guid isPermaLink="false">48424@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;Thank you both! I will do!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>riq on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48415</link>
			<pubDate>Fri, 30 Jul 2010 14:20:37 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">48415@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/1132'&#62;hm50&#60;/a&#62;: try downloading the latest &#34;develop&#34; branch:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$ git clone git://github.com/cocos2d/cocos2d-iphone.git develop&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>araker on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48388</link>
			<pubDate>Fri, 30 Jul 2010 05:44:58 +0000</pubDate>
			<dc:creator>araker</dc:creator>
			<guid isPermaLink="false">48388@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/1132'&#62;hm50&#60;/a&#62;, CJ patched the development branch,  that property doesn't exist yet in cocos 0.99.4. I assume it's support for rotated sprites in the new zwoptex version. So remove everything from the if (_rectRotated) { } and it will work brilliantly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hm50 on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48386</link>
			<pubDate>Fri, 30 Jul 2010 04:46:02 +0000</pubDate>
			<dc:creator>hm50</dc:creator>
			<guid isPermaLink="false">48386@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;Using the patch provided by @CJ I get the following build error: 'rectRotated_' undeclared (in CCSprite.m).&#60;/p&#62;
&#60;p&#62;What other update would I be missing?&#60;/p&#62;
&#60;p&#62;Thanks! I can't wait to try this on my 'black line' issue!!&#60;/p&#62;
&#60;p&#62;Harv
&#60;/p&#62;</description>
		</item>
		<item>
			<title>CJ on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48383</link>
			<pubDate>Fri, 30 Jul 2010 02:54:07 +0000</pubDate>
			<dc:creator>CJ</dc:creator>
			<guid isPermaLink="false">48383@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/26'&#62;Metric&#60;/a&#62;&#60;br /&#62;
What you describe for mapping a rect of pixels texture coordinates in the range [0,1] is what we all assumed before. It does make logical sense that a rect of pixels (0,0,512,512) maps with tex coords (0,0),(1,1).&#60;/p&#62;
&#60;p&#62;But, in practice, that naive implementation doesn't work so well. The formulas I provided above simply change the sample point from the corner of a pixel (at the intersection of 4 pixels) to the center (where there is only one color available).&#60;/p&#62;
&#60;p&#62;Regarding your understanding of valid values for the u,v range... You are not required to keep them in the range [0,1]. Depending on the texture wrap setting, the texture may clamp or repeat. There is no need to manually clamp the values in your program code.&#60;br /&#62;
Read: &#60;a href=&#34;http://www.opengl.org/wiki/Texture#Edge_value_sampling&#34; rel=&#34;nofollow&#34;&#62;http://www.opengl.org/wiki/Texture#Edge_value_sampling&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Metric on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48359</link>
			<pubDate>Thu, 29 Jul 2010 21:39:02 +0000</pubDate>
			<dc:creator>Metric</dc:creator>
			<guid isPermaLink="false">48359@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;Actually, in theory those formulas should not work at all that you presented.&#60;/p&#62;
&#60;p&#62;Texture mapping is essentially the image size ranging from 0,0 to 1,1 in 3D. You shouldn't have to times by 2 the rect position or size, or the atlas image size either.&#60;/p&#62;
&#60;p&#62;If you keep them all pixel based to begin with then there only needs to be one conversion to the range of 0 to 1.&#60;/p&#62;
&#60;p&#62;the rect x,y,width,height are all in pixels, and the atlasWidth and height are also in pixels&#60;/p&#62;
&#60;p&#62;If they are all pixel based and the maximum size is atlasWidth and atlasHeight then technically just dividing by atlasWidth and atlasHeight will results in a value of 0 to 1. However, it will only be 0 to 1 if the left side of the equation is &#38;lt;= atlasWidth or atlasHeight and &#38;gt;= 0.&#60;/p&#62;
&#60;p&#62;If we have an atlas of 512x512 and a rect of x=20,y=20,width=512,height=512. Then we have a problem, because the rect + either the x / y will cause the amount to be greater than atlasWidth or atlasHeight. Thus, you will get a value larger than 1. However if we have rect of x=0,y=0,width=512,height=512 then everything is fine a dandy because everything will stay within the range of the maximum atlasHeight and atlasWidth. Therefore everything will be 0 to 1.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;float right = (rect.x + rect.width) / atlasWidth; // problem: if rect.x+rect.width &#38;gt; atlasWidth then the result will be a value larger than 1 which is no go! The value for texels must be between 0 and 1!

float left = rect.x / atlasWidth; //problem: if rect.x &#38;gt; atlasWidth then the result will be a value larger than 1 which is a no go! The value for texels must be between 0 and 1!

float top = rect.y / atlasHeight; // same problem as above
float bottom = (rect.y + rect.height) / atlasHeight; // same problem as above

//Another problem is the fact if someone gives a negative value for rect.x, rect.y or rect.width, rect.height. This is a no go either because it is less than 0!

//Solution clamp the values to range from 0 to 1
top = clamp(top);
left = clamp(left);
right = clamp(right);
bottom = clamp(bottom);

/**
 * Simple Clamp function for 0 to 1
 * @return float
 */
float clamp(float value)
{
   if(value &#38;gt; 1)
   {
     return 1.0f;
   }
   else if(value &#38;lt; 0)
   {
     return 0.0f;
   }
   else
   {
     return value;
   }
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>hactar on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267/page/2#post-48354</link>
			<pubDate>Thu, 29 Jul 2010 20:59:34 +0000</pubDate>
			<dc:creator>hactar</dc:creator>
			<guid isPermaLink="false">48354@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;Well a reduction from 4 to 1 pixel padding is still great! thanks cj for finding this holy Grail! Maybe @cj could have a look at issue 737, I wouldn't be surprised if they are linked...&#60;/p&#62;
&#60;p&#62;Anyway, well done!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>abitofcode on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48344</link>
			<pubDate>Thu, 29 Jul 2010 19:53:50 +0000</pubDate>
			<dc:creator>abitofcode</dc:creator>
			<guid isPermaLink="false">48344@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/3916'&#62;liquidfire&#60;/a&#62; That'll be 'Angry jumping doodle zombie turbo birds'&#60;/p&#62;
&#60;p&#62;@CJ I think you've earned this, the fabled platinum sausage!&#60;/p&#62;
&#60;p&#62;&#60;img src=&#34;http://a.yfrog.com/img827/6929/us1.jpg&#34; /&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>CJ on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48336</link>
			<pubDate>Thu, 29 Jul 2010 19:25:41 +0000</pubDate>
			<dc:creator>CJ</dc:creator>
			<guid isPermaLink="false">48336@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;hehehe, thanks guys :)&#60;/p&#62;
&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/1222'&#62;abitofcode&#60;/a&#62;&#60;br /&#62;
Re &#60;a href=&#34;http://www.cocos2d-iphone.org/forum/topic/762&#34;&#62;Box2d vs Chipmunk&#60;/a&#62;: They're both good. Choose the one that makes sense to you. Perhaps one has the joint types you need, or other features. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>liquidfire on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48335</link>
			<pubDate>Thu, 29 Jul 2010 19:23:19 +0000</pubDate>
			<dc:creator>liquidfire</dc:creator>
			<guid isPermaLink="false">48335@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62; @CJ while you're on a roll maybe you could provide the answer to the other great cocos2d forum question... Which is better chipmunk or box2d? ;)&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Oooooh I want a shot at this:&#60;/p&#62;
&#60;p&#62;@CJ - What is a great app idea that will make me the most money? ;) &#60;/p&#62;
&#60;p&#62;Oooh if only it was that easy.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>abitofcode on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48334</link>
			<pubDate>Thu, 29 Jul 2010 19:14:10 +0000</pubDate>
			<dc:creator>abitofcode</dc:creator>
			<guid isPermaLink="false">48334@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;Oh yes!&#60;/p&#62;
&#60;p&#62;@CJ while you're on a roll maybe you could provide the answer to the other great cocos2d forum question... Which is better chipmunk or box2d? ;)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>riq on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48332</link>
			<pubDate>Thu, 29 Jul 2010 19:00:15 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">48332@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;I'm about to release v0.99.5-beta... are you OK if we called this version  &#34;no-more-artifacts-thanks-to-CJ&#34; ?&#60;/p&#62;
&#60;p&#62;Updated:&#60;/p&#62;
&#60;p&#62;or: &#34;CJ-the-artifac-fixer&#34;&#60;/p&#62;
&#60;p&#62;or: &#34;CJ-vs-the-artifacs&#34;&#60;/p&#62;
&#60;p&#62;or... ?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>abitofcode on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48330</link>
			<pubDate>Thu, 29 Jul 2010 18:46:43 +0000</pubDate>
			<dc:creator>abitofcode</dc:creator>
			<guid isPermaLink="false">48330@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;cocos2d god of the week award goes to......&#60;/p&#62;
&#60;p&#62;CJ&#60;/p&#62;
&#60;p&#62;:D&#60;/p&#62;
&#60;p&#62;Nice find!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>riq on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48321</link>
			<pubDate>Thu, 29 Jul 2010 17:59:02 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">48321@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/1750'&#62;hactar&#60;/a&#62;: Well, it doesn't fix that problem but it is really mitigated. &#34;exact&#34; and &#34;1 pixel&#34; are almost identical.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hactar on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48308</link>
			<pubDate>Thu, 29 Jul 2010 16:35:17 +0000</pubDate>
			<dc:creator>hactar</dc:creator>
			<guid isPermaLink="false">48308@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@riq, could you run it with the mipmaping problem (issue 737)? I'd be interested if this fixes the problem here too. I could save soo much texture space.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>riq on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48305</link>
			<pubDate>Thu, 29 Jul 2010 16:18:20 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">48305@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;following @CJ's idea, I've patched &#60;code&#62;CCTileMapAtlas&#60;/code&#62;, &#60;code&#62;CCLabelAtlas&#60;/code&#62; and &#60;code&#62;CCQuadParticleSystem&#60;/code&#62;&#60;br /&#62;
&#60;a href=&#34;http://github.com/cocos2d/cocos2d-iphone/commit/9e3132d8379b13db3c9a3943f0b8908a7e2bb509&#34; rel=&#34;nofollow&#34;&#62;http://github.com/cocos2d/cocos2d-iphone/commit/9e3132d8379b13db3c9a3943f0b8908a7e2bb509&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I've done some tests and there is no flicker when a &#60;code&#62;CCTileMapAtlas&#60;/code&#62; is rendered using anti-alias, is moved and scaled at the same time. Nice!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>riq on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48280</link>
			<pubDate>Thu, 29 Jul 2010 13:28:23 +0000</pubDate>
			<dc:creator>riq</dc:creator>
			<guid isPermaLink="false">48280@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;yes, cocos2d should be responsible for doing this. Zwoptex and any other tools (Hiero font editor, etc) should use pixel coordinates, and cocos2d should convert them to texture coordinates.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Robert Payne on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48250</link>
			<pubDate>Thu, 29 Jul 2010 05:51:41 +0000</pubDate>
			<dc:creator>Robert Payne</dc:creator>
			<guid isPermaLink="false">48250@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@CJ Sounds good. It also saves texture memory by not requiring the user to add additional padding just to get around this issue.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>CJ on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48247</link>
			<pubDate>Thu, 29 Jul 2010 05:07:51 +0000</pubDate>
			<dc:creator>CJ</dc:creator>
			<guid isPermaLink="false">48247@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/4542'&#62;Robert&#60;/a&#62;, I think zwoptex can safely continue using pixel coordinates as it makes the most sense and makes hand editing plists easier.&#60;/p&#62;
&#60;p&#62;I think it's best left to the rendering implementation (cocos2d) to translate the desired texture rect into texture coordinates.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Robert Payne on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48242</link>
			<pubDate>Thu, 29 Jul 2010 04:38:57 +0000</pubDate>
			<dc:creator>Robert Payne</dc:creator>
			<guid isPermaLink="false">48242@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@CJ, @Riq&#60;/p&#62;
&#60;p&#62;I intended to eventually patch this into Zwoptex but perhaps it is better handled by the Cocos2d engine.&#60;/p&#62;
&#60;p&#62;IS there anything specifically Zwoptex should do to further support this? I'm still not just quite ready to do the full research and implementation on it but want to be made away of any fixes.&#60;/p&#62;
&#60;p&#62;-Robert
&#60;/p&#62;</description>
		</item>
		<item>
			<title>CJ on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48241</link>
			<pubDate>Thu, 29 Jul 2010 04:23:13 +0000</pubDate>
			<dc:creator>CJ</dc:creator>
			<guid isPermaLink="false">48241@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;@&#60;a href='http://www.cocos2d-iphone.org/forum/profile/22'&#62;Codemattic&#60;/a&#62; Oops, you are right. Good catch. I've updated the main post with the correct numbers.&#60;/p&#62;
&#60;p&#62;@everyone Happy to help. I must say that I highly recommend reading the book on oreilly:&#60;br /&#62;
&#60;a href=&#34;http://iphone-3d-programming.labs.oreilly.com&#34; rel=&#34;nofollow&#34;&#62;http://iphone-3d-programming.labs.oreilly.com&#60;/a&#62; I would never have realized this without the diagram and explanation of texel space from that book.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Codemattic on "Correct Texture coordinates may fix a long lingering issue"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/8267#post-48218</link>
			<pubDate>Thu, 29 Jul 2010 01:07:29 +0000</pubDate>
			<dc:creator>Codemattic</dc:creator>
			<guid isPermaLink="false">48218@http://www.cocos2d-iphone.org/forum/</guid>
			<description>&#60;p&#62;CJ, Im trying to understand this example:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
For example an atlas of size 256x256 that contains a sprite image at 10,10 with size 100x100 the correct texture coordinates for each vertex are as follows:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;21/256, 21/256
21/256, 219/256
219/256, 219/256
219/256, 21/256&#60;/code&#62;&#60;/pre&#62;
&#60;/blockquote&#62;
&#60;p&#62;should those 256s be 512s?&#60;/p&#62;
&#60;p&#62;Anyway - fantastic code CJ, thanks so much!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
