<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Fullscreen shaders and effects.]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=300&amp;type=atom"/>
	<updated>2012-09-06T06:21:03Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=300</id>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2516#p2516"/>
			<content type="html"><![CDATA[<p>Thanks!<br />From which object should I obtain the current FPS?</p><p>About post-processing:<br />Since I used&nbsp; SCREEN_WIDTH * SCREEN_HEIGHT&nbsp; (768 * 1204 on iPad , 640*960 on&nbsp; Retina iPhone )&nbsp; as texture dimensions, I added<br /></p><div class="codebox"><pre><code>render-&gt;setTextureUWrapMode(M_WRAP_CLAMP);
render-&gt;setTextureVWrapMode(M_WRAP_CLAMP);</code></pre></div><p>in <br /></p><div class="codebox"><pre><code>render-&gt;createTexture(&amp;m_depthTextureId);
render-&gt;bindTexture(m_depthTextureId);
render-&gt;setTextureFilterMode(M_TEX_FILTER_NEAREST, M_TEX_FILTER_NEAREST);
render-&gt;texImage(0, SCREEN_WIDTH, SCREEN_HEIGHT, M_UINT, M_DEPTH, 0);</code></pre></div><p>after render-&gt;bindTexture(m_depthTextureId);</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-06T06:21:03Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2516#p2516</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2515#p2515"/>
			<content type="html"><![CDATA[<p>To draw text on top of your game you can use a text object (MOText) in a separate scene.</p><p>In cpp like this : <a href="http://www.maratis3d.org/?p=563">http://www.maratis3d.org/?p=563</a><br />Or in script (it&#039;s a new feature) : <a href="http://wiki.maratis3d.org/index.php?title=EnableCameraLayer">http://wiki.maratis3d.org/index.php?tit &#133; ameraLayer</a></p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-09-05T15:02:22Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2515#p2515</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2514#p2514"/>
			<content type="html"><![CDATA[<p><span class="postimg"><img src="http://desmond.imageshack.us/Himg825/scaled.php?server=825&amp;filename=photo2htu.png&amp;res=landing" alt="DoF screenshot" /></span></p><p>About performance - what is the best way to display FPS on screen?<br />I want to see it during development of my app.<br />Other statistics are also useful.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-05T14:52:07Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2514#p2514</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2507#p2507"/>
			<content type="html"><![CDATA[<p>Cool ! can we see a screenshot ? <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />how is the performance ?</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-09-05T10:37:01Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2507#p2507</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2503#p2503"/>
			<content type="html"><![CDATA[<p>I added post-process DoF to iOS example.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-05T08:26:20Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2503#p2503</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2501#p2501"/>
			<content type="html"><![CDATA[<p>Nice, thanks,<br />I&#039;ll try to modify all examples to use M_UINT to be cross platform.</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-09-04T09:53:08Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2501#p2501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2495#p2495"/>
			<content type="html"><![CDATA[<p>Ok<br />For retina support I added&nbsp; &nbsp;<br />self.contentScaleFactor&nbsp; = [UIScreen mainScreen].scale; <br />&nbsp; in&nbsp; initRenderingContext in EAGLView, </p><p>#define SCREEN_WIDTH ( [UIScreen mainScreen].bounds.size.width * [UIScreen mainScreen].scale)<br />#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale)<br />to MyGame , and change all occurrences of screenWidth/ screenHeight and RESOL macro with these macroses.<br />Its now works on Retina.</p><p>I&#039;ve also found a bug on iPad 1 with iOS 4.3.3, where short after launches program crashes with EXC_BAD_ACCESS.<br />I will deploy my app on 5.* and newer firmwares, so I leave this bug for now.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-03T14:21:26Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2495#p2495</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2494#p2494"/>
			<content type="html"><![CDATA[<p>Hi,</p><p>well done, thanks,<br />that&#039;s a bit strange they changed the support of this,<br />so it will also need to be changed in MiOSStandardRenderer.cpp for the shadow texture</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-09-03T13:58:25Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2494#p2494</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2493#p2493"/>
			<content type="html"><![CDATA[<p>I change M_UBYTE&nbsp; to M_UINT<br /> render-&gt;texImage(0, RESOL, RESOL, M_UBYTE, M_DEPTH, 0); , and program began to work.<br />Now project works on 4.3.3 and 5.1 devices, and on simulator.<br />On Retina display, image takes only quarter of screen. <br />I will fix this now, and then I&#039;ll start to add Depth of Field to this app</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-03T13:22:38Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2493#p2493</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2491#p2491"/>
			<content type="html"><![CDATA[<p>I add&nbsp; &nbsp; &nbsp; &nbsp;glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);&nbsp; &nbsp; at start of the resizeFromLayer:&nbsp; , and buffers are created&nbsp; on 5.*<br />Now I have to deal with&nbsp; 0x500 in&nbsp; &nbsp; &nbsp; &nbsp; render-&gt;texImage(0, RESOL, RESOL, M_UBYTE, M_DEPTH, 0); in MyGame.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-03T09:52:12Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2491#p2491</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2490#p2490"/>
			<content type="html"><![CDATA[<p>I&#039;ve found that <br />glCheckFramebufferStatus(GL_FRAMEBUFFER)&nbsp; returns error after<br /></p><div class="codebox"><pre><code>glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
[context renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer];</code></pre></div><p> <br />in resizeFromLayer: in ES2Renderer.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-03T09:05:32Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2490#p2490</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2489#p2489"/>
			<content type="html"><![CDATA[<p>I not found the error for now. <br />I tried to compare initialization code in maratis ios project with initialization code in Cocos2D v 2.0.<br />In Cocos2d 2.0 init and creation of ramebuffer (with depth attachment) is ok both on 4.* and on 5.*.<br />Code in both projects looks equally, but in maratis I still have &quot; Failed to make complete framebuffer object 8cdd&quot; in glCheckFramebufferStatus(GL_FRAMEBUFFER).<br />I think that reason may be in maratis 3d code, which executed between calls to [ES2Renderer init] and [ES2Renderer resizeFromLayer:]<br />I will try to find it now.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-09-03T08:13:15Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2489#p2489</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2480#p2480"/>
			<content type="html"><![CDATA[<p>On iOS 5.* I also get 0x8cdd (GL_FRAMEBUFFER_UNSUPPORTED) in glCheckFramebufferStatus(GL_FRAMEBUFFER)&nbsp; in <br /></p><div class="codebox"><pre><code>- (BOOL) resizeFromLayer:(CAEAGLLayer *)layer;</code></pre></div><p>in ES2Renderer.mm.</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-08-31T13:43:58Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2480#p2480</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2479#p2479"/>
			<content type="html"><![CDATA[<p>On 4.3 devices all is ok.<br />On iPhone 4 (with retina display) image occupies a quarter of the screen (I think I must set contentScalFactor somewhere)</p>]]></content>
			<author>
				<name><![CDATA[Petr]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1081</uri>
			</author>
			<updated>2012-08-31T13:03:39Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2479#p2479</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Fullscreen shaders and effects.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2478#p2478"/>
			<content type="html"><![CDATA[<p>thanks</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-08-31T12:54:59Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2478#p2478</id>
		</entry>
</feed>
