<?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"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: shaders in jit.gl.sketch?</title>
		<atom:link href="http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 01:00:59 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-24426</guid>
					<title><![CDATA[shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-24426</link>
					<pubDate>Tue, 14 Feb 2006 22:33:25 +0000</pubDate>
					<dc:creator>lists@lowfrequency.or</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Can someone help me out with a quick example of how to use a <br />
jit.gl.shader in a jit.gl.sketch cmdlist?<br />
Is that possible?</p>
<p>Thanks,<br />
Evan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70585</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70585</link>
					<pubDate>Tue, 14 Feb 2006 22:39:48 +0000</pubDate>
					<dc:creator>Wesley Smith</dc:creator>

					<description>
						<![CDATA[
						<p>Works  here.  All I did was add this:</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P flonum 117 114 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window linecount 1;<br />
#P message 103 134 104 196617 param edgefalloff $1;<br />
#P message 100 154 93 196617 read mat.xray.jxs;<br />
#P newex 61 177 125 196617 jit.gl.shader foo @name x;<br />
#P connect 2 0 0 0;<br />
#P connect 3 0 2 0;<br />
#P connect 1 0 0 0;<br />
#P window clipboard copycount 4;</p>
<p>
to the sketch help file along with a message &#8220;shader x&#8221; connected to<br />
jit.gl.sketch.  Adjust the shader parameter to see if it&#8217;s working.</p>
<p>wes</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70586</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70586</link>
					<pubDate>Tue, 14 Feb 2006 22:57:23 +0000</pubDate>
					<dc:creator>lists@lowfrequency.or</dc:creator>

					<description>
						<![CDATA[
						<p>True, that&#8217;s one way.  I was thinking more of applying shaders to <br />
different objects in a sketch cmdlist, like (in psuedo-code):</p>
<p>1. enable texture<br />
2. use texture<br />
3. use shader (from jit.gl.shader)<br />
4. draw sphere or other shape</p>
<p>Just curious &#8211; I have a jit.gl.sketch drawing lots of concentric <br />
spheres, and it would be great to apply shaders to some of those <br />
spheres but not all.</p>
<p>thanks,<br />
-evan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70587</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70587</link>
					<pubDate>Tue, 14 Feb 2006 23:05:14 +0000</pubDate>
					<dc:creator>Wesley Smith</dc:creator>

					<description>
						<![CDATA[
						<p>> Just curious &#8211; I have a jit.gl.sketch drawing lots of concentric<br />
> spheres, and it would be great to apply shaders to some of those<br />
> spheres but not all.<br />
></p>
<p>In this case, I would be includes to use a gridshape with @automatic 0<br />
and multiple draws.  If you have 2+ gridshapes, you can assign them<br />
differenct shaders or none at all.  You just need to manage scale and<br />
positioning.  I posted some JS stuff in javscript-dev that outlined<br />
how to do this.</p>
<p>good luck,<br />
wes</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70588</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70588</link>
					<pubDate>Wed, 15 Feb 2006 00:41:53 +0000</pubDate>
					<dc:creator>Joshua Kit Clayton</dc:creator>

					<description>
						<![CDATA[
						<p>On Feb 14, 2006, at 2:57 PM, evan.raskob wrote:</p>
<p>> True, that&#8217;s one way.  I was thinking more of applying shaders to  <br />
> different objects in a sketch cmdlist, like (in psuedo-code):<br />
><br />
> 1. enable texture<br />
> 2. use texture<br />
> 3. use shader (from jit.gl.shader)<br />
> 4. draw sphere or other shape</p>
<p>Actually there&#8217;s (undocumented) code in place for binding shader  <br />
programs in jit.gl.sketch. The commands are glbindprogram  <br />
<shadername>, and glunbindprogram </shadername><shadername> (which is equivalent  <br />
to glbindprogram with no argument). So, assuming you have an instance  <br />
of [jit.gl.shader @name shady] in your patch, something like the  <br />
following should work. At bottom is a simple example with a similar  <br />
program, plus some extra bells and whistles to make it look better.</shadername></p>
<p>reset,<br />
glbindprogram shady,<br />
sphere 0.5,<br />
glunbindprogram shady,<br />
moveto -0.5 0. 0.,<br />
glcolor 1. 0.7 0.5,<br />
sphere 0.5</p>
<p>Note that you can also bind/unbind textures in a similar fashion with  <br />
glbindtexture <texturename> <textureunit>. To unbind, you would  <br />
provide no <texturename> argument. In fact you can actually implement  <br />
something like slab with these commands if you set up the modelview  <br />
transform and geometry properly. FWIW, before we made a C object for  <br />
jit.gl.slab, we prototyped it with jit.gl.sketch.</texturename></textureunit></texturename></p>
<p>Let us know if you encounter any problems.</p>
<p>-Joshua</p>
<p>
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P newex 220 256 157 196617 jit.gl.handle foo @blend_enable 1;<br />
#P window linecount 4;<br />
#P message 228 148 320 196617 reset , shapeslice 80 80 , glenable  <br />
cull_face , glcullface 1 , glenable depth_test , glcolor 0.4 0.6  <br />
0.7 , sphere 0.5 , glblendfunc 6 1 , moveto -0.5 0. 0. ,  <br />
gldisable cull_face , gldisable depth_test , glcolor 0.5 0.2 0.1 ,  <br />
glbindprogram shady , sphere 0.5 , glunbindprogram shady;<br />
#P window linecount 1;<br />
#P newex 294 328 234 196617 jit.gl.shader foo @name shady @file  <br />
mat.xray.jxs;<br />
#B color 5;<br />
#P toggle 241 452 15 0;<br />
#P message 241 470 55 196617 floating $1;<br />
#P hidden message 48 413 68 196617 camera 0 0 4;<br />
#P toggle 168 452 15 0;<br />
#P newex 129 451 35 196617 sel 27;<br />
#P message 168 470 68 196617 fullscreen $1;<br />
#P newex 86 494 186 196617 jit.window foo @depthbuffer 1 @fsaa 1;<br />
#P newex 84 451 40 196617 key;<br />
#P user jit.fpsgui 59 234 60 196617 0;<br />
#P newex 136 412 43 196617 s shady;<br />
#P toggle 136 362 15 0;<br />
#P message 136 385 94 196617 smooth_shading $1;<br />
#P toggle 235 362 15 0;<br />
#P message 235 385 90 196617 lighting_enable $1;<br />
#P hidden newex 176 319 50 196617 loadbang;<br />
#P number 60 105 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P toggle 15 105 15 0;<br />
#P newex 15 131 55 196617 qmetro 20;<br />
#P newex 15 208 55 196617 t b erase b;<br />
#P newex 144 297 158 196617 jit.gl.sketch foo @blend_enable 1;<br />
#P newex 15 585 213 196617 jit.gl.render foo @erase_color 0.7 0.7 0.7  <br />
1.;<br />
#P hidden message 176 341 14 196617 1;<br />
#P newex 144 227 43 196617 r shady;<br />
#P connect 6 0 5 0;<br />
#P connect 5 0 4 0;<br />
#P fasten 3 0 2 0 149 328 20 328;<br />
#P hidden fasten 20 0 2 0 53 506 20 506;<br />
#P connect 4 0 2 0;<br />
#P fasten 4 1 2 0 42 234 20 234;<br />
#P hidden connect 8 0 20 0;<br />
#P connect 4 2 14 0;<br />
#P connect 7 0 5 1;<br />
#P fasten 21 0 16 0 246 489 91 489;<br />
#P fasten 17 0 16 0 173 489 91 489;<br />
#P fasten 15 0 18 0 89 470 126 470 126 449 134 449;<br />
#P hidden fasten 1 0 12 0 181 359 141 359;<br />
#P connect 12 0 11 0;<br />
#P fasten 9 0 13 0 240 407 141 407;<br />
#P fasten 11 0 13 0 141 407 141 407;<br />
#P connect 25 0 3 0;<br />
#P fasten 0 0 3 0 149 265 149 265;<br />
#P connect 24 0 3 0;<br />
#P fasten 18 0 19 0 134 469 165 469 165 449 173 449;<br />
#P connect 19 0 17 0;<br />
#P hidden connect 8 0 1 0;<br />
#P hidden connect 8 0 24 0;<br />
#P hidden fasten 1 0 10 0 181 359 240 359;<br />
#P connect 10 0 9 0;<br />
#P connect 22 0 21 0;<br />
#P window clipboard copycount 26;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70589</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70589</link>
					<pubDate>Wed, 15 Feb 2006 15:59:04 +0000</pubDate>
					<dc:creator>lists@lowfrequency.or</dc:creator>

					<description>
						<![CDATA[
						<p>that&#8217;s awesome joshua, that&#8217;s just what i was hoping for.</p>
<p>and to answer wesley (and anyone else who is interested), i&#8217;m using <br />
jit.gl.sketch because it allows you to draw and texture multiple shapes <br />
at once, and then with the capture attribute, you can render it to a <br />
texture and then put it through a series of slabs and such.  since you <br />
can&#8217;t render only a group of jit.gl.gridshapes together and have them <br />
capture to a single texture (as far as i can figure out), you need <br />
sketch.  i have a massive patch that uses this to create a series of <br />
versions of a single sketch rendering, and then i use a crossfader slab <br />
to fade between each for seamless fx blending between each rendering, <br />
plus other layers of gridshapes mixed into the final scene.  very hot.  <br />
even at 640&#215;480 for each texture (explicitly set using @dim 640 480), <br />
it runs incredibly well on my 2 year old powerbook.</p>
<p>best,<br />
evan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70590</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70590</link>
					<pubDate>Wed, 15 Feb 2006 16:23:51 +0000</pubDate>
					<dc:creator>lists@lowfrequency.or</dc:creator>

					<description>
						<![CDATA[
						<p>one odd thing &#8211; in the example patch in your email, changing the X,Y,Z <br />
values in the &#8220;moveto X Y Z&#8221; line makes no difference on my machine, <br />
jitter 1.5.2 in OS X 10.3.9.  is that because of my admittedly <br />
incomplete understanding of OpenGL?  it&#8217;d be great of you could explain <br />
why it works like that, or if it&#8217;s not supposed to work like that&#8230;</p>
<p>thanks,<br />
evan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70591</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70591</link>
					<pubDate>Wed, 15 Feb 2006 16:24:46 +0000</pubDate>
					<dc:creator>Andrew Benson</dc:creator>

					<description>
						<![CDATA[
						<p>Hey Evan,</p>
<p>>since you can&#8217;t render only a group of jit.gl.gridshapes together >and have them capture to a single texture (as far as i can figure >out)</p>
<p>This is not entirely true.  Please see:</p>
<p><a href="http://cycling74.com/story/2006/2/14/161736/108" rel="nofollow">http://cycling74.com/story/2006/2/14/161736/108</a><br />
Recipe 24: GLFeedBack.</p>
<p>This gives a technique for using the &#8220;to_texture&#8221; message for capturing a scene to texture.  I would imagine that using jit.gl.sketch is probably your most efficient option anyway, so it sounds like you are doing fine.  I would love to see the results.<br />
&#8211;<br />
AB</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70592</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70592</link>
					<pubDate>Wed, 15 Feb 2006 17:08:27 +0000</pubDate>
					<dc:creator>solu</dc:creator>

					<description>
						<![CDATA[
						<p>
and one question about coordinates:<br />
which is the best jitter-object for tracking movement, if the <br />
movement is supposed to be sent as coordinates (x,y) to another <br />
programme like flash ?<br />
im looking something similar to what eyesweb has for tracking ,&#8230;.</p>
<p>thanks a lot in advance,<br />
m.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70593</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70593</link>
					<pubDate>Wed, 15 Feb 2006 17:08:47 +0000</pubDate>
					<dc:creator>solu</dc:creator>

					<description>
						<![CDATA[
						<p>dear all,</p>
<p>i have a friend who is programming c++,  how could his code be <br />
translated into an jitter-object ?<br />
or something that works with jitter patch ?</p>
<p>best,<br />
m.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70594</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70594</link>
					<pubDate>Wed, 15 Feb 2006 17:14:41 +0000</pubDate>
					<dc:creator>Wesley Smith</dc:creator>

					<description>
						<![CDATA[
						<p>Have a look at <a href="http://www.mat.ucsb.edu/~whsmith/jool.html" rel="nofollow">http://www.mat.ucsb.edu/~whsmith/jool.html</a> .  There you<br />
fill find a Codewarrior project for doing C++ in jitter.  If you&#8217;re<br />
working on Windows, check out the jit.atari2600 posts.  Kyle, who<br />
wrote the external, has bee doing C++ in Jitter in Visual Studio.  If<br />
you ask, I bet he&#8217;ll send you the project and you can use it as a<br />
starting point for doing C++ in Jitter on windows.</p>
<p>wes</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70595</guid>
					<title><![CDATA[Re: shaders in jit.gl.sketch?]]></title>
					<link>http://cycling74.com/forums/topic/shaders-in-jit-gl-sketch/#post-70595</link>
					<pubDate>Thu, 16 Feb 2006 05:34:01 +0000</pubDate>
					<dc:creator>williamshome</dc:creator>

					<description>
						<![CDATA[
						<p>Sounds interesting.</p>
<p>I am working with &#8220;to_texture&#8221; by the moment, does the &#8220;capture&#8221; keyword<br />
also copy the current rendered scene in the front buffer into the using<br />
texture or it does other tricks ? It would be great if it can capture an<br />
off-screen buffer.</p>
<p>I have been looking into the documentation and seems there is alot hidden<br />
command I can cast on the jit.gl.sketch object. Anyone know if there is a<br />
compete list of usable commands ?</p>
<p>^_^,<br />
William</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

