<?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: Default parameter saving in Shader Toy</title>
	<atom:link href="http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/</link>
	<description></description>
	<lastBuildDate>Fri, 23 Jul 2010 01:34:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nick</title>
		<link>http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/comment-page-1/#comment-400</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Thu, 11 Feb 2010 00:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=1346#comment-400</guid>
		<description>I currently have a working regex that handles the situation (taking into account line breaks, arbitrary spacing, and attributes) to replace the default value. It works, but I have some other issue to work out; my float slider always sticks to the max value when I tweak it. I&#039;m guessing some circular &quot;my slider changes the shader which forces a recompile which sets the parameter which changes the slider&quot; type of issue. Just more fun stuff to fix. :)</description>
		<content:encoded><![CDATA[<p>I currently have a working regex that handles the situation (taking into account line breaks, arbitrary spacing, and attributes) to replace the default value. It works, but I have some other issue to work out; my float slider always sticks to the max value when I tweak it. I&#8217;m guessing some circular &#8220;my slider changes the shader which forces a recompile which sets the parameter which changes the slider&#8221; type of issue. Just more fun stuff to fix. <img src='http://blog.nickgravelyn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CrappyCodingGuy</title>
		<link>http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/comment-page-1/#comment-399</link>
		<dc:creator>CrappyCodingGuy</dc:creator>
		<pubDate>Wed, 10 Feb 2010 14:09:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=1346#comment-399</guid>
		<description>Hmmm - that was all nicely indented when I typed it :(</description>
		<content:encoded><![CDATA[<p>Hmmm &#8211; that was all nicely indented when I typed it <img src='http://blog.nickgravelyn.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CrappyCodingGuy</title>
		<link>http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/comment-page-1/#comment-398</link>
		<dc:creator>CrappyCodingGuy</dc:creator>
		<pubDate>Wed, 10 Feb 2010 14:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=1346#comment-398</guid>
		<description>I guess the parsing seems fairly straightforward to me...

for each line in the input file
  for each defined variable
    if the line contains the variable
      if a semicolon trails directly after the variable
        replace the semicolon with the default value + &quot;;&quot;
      else if an &quot;=&quot; trails directly after the variable
        find the trailing semicolon
        replace everything between &quot;=&quot; and &quot;;&quot; with the default value

  write the line to the output file - this will either be the unedited or modified line


if everything succeeds
  delete inputfile.old
  rename the input file to inputfile.old
  rename the output file to inputfile.fx</description>
		<content:encoded><![CDATA[<p>I guess the parsing seems fairly straightforward to me&#8230;</p>
<p>for each line in the input file<br />
  for each defined variable<br />
    if the line contains the variable<br />
      if a semicolon trails directly after the variable<br />
        replace the semicolon with the default value + &#8220;;&#8221;<br />
      else if an &#8220;=&#8221; trails directly after the variable<br />
        find the trailing semicolon<br />
        replace everything between &#8220;=&#8221; and &#8220;;&#8221; with the default value</p>
<p>  write the line to the output file &#8211; this will either be the unedited or modified line</p>
<p>if everything succeeds<br />
  delete inputfile.old<br />
  rename the input file to inputfile.old<br />
  rename the output file to inputfile.fx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/comment-page-1/#comment-397</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 10 Feb 2010 02:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=1346#comment-397</guid>
		<description>I don&#039;t see how it&#039;s reinventing the wheel. My goal is to not require custom content pipelines or runtimes for something as logically trivial as a default parameter value. Something that could easily be hand coded in the file shouldn&#039;t need a whole suite of attributes and runtimes just to be able to set that default with UI.

And I already do support range limits for my UI (at least my float one); I just use &#039;min&#039; and  &#039;max&#039; instead of the DXSAS names. I could switch or support both if I got the desire. ;-)</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see how it&#8217;s reinventing the wheel. My goal is to not require custom content pipelines or runtimes for something as logically trivial as a default parameter value. Something that could easily be hand coded in the file shouldn&#8217;t need a whole suite of attributes and runtimes just to be able to set that default with UI.</p>
<p>And I already do support range limits for my UI (at least my float one); I just use &#8216;min&#8217; and  &#8216;max&#8217; instead of the DXSAS names. I could switch or support both if I got the desire. <img src='http://blog.nickgravelyn.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Björn</title>
		<link>http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/comment-page-1/#comment-396</link>
		<dc:creator>Björn</dc:creator>
		<pubDate>Wed, 10 Feb 2010 02:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=1346#comment-396</guid>
		<description>So, doing it properly (yep, that might be a tiny tad exaggerating :)) is overkill but reinventing the wheel in a limited way is not? Also, sooner or later you might want to have something like the range limits for your UI, and later some other stuff of the DXSAS thingy :)

Find something else to write a parser for :)</description>
		<content:encoded><![CDATA[<p>So, doing it properly (yep, that might be a tiny tad exaggerating <img src='http://blog.nickgravelyn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) is overkill but reinventing the wheel in a limited way is not? Also, sooner or later you might want to have something like the range limits for your UI, and later some other stuff of the DXSAS thingy <img src='http://blog.nickgravelyn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Find something else to write a parser for <img src='http://blog.nickgravelyn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/comment-page-1/#comment-395</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 09 Feb 2010 21:31:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=1346#comment-395</guid>
		<description>It seems like that&#039;s just overkill. To require a whole content pipeline just for a single default value seems like someone&#039;s doing something wrong. I can understand the use for having varying parameter sets, but for something this simple, why is changing it in the effect text such a bad idea? Other than trying to figure out the best way to parse the text and fix it. :)</description>
		<content:encoded><![CDATA[<p>It seems like that&#8217;s just overkill. To require a whole content pipeline just for a single default value seems like someone&#8217;s doing something wrong. I can understand the use for having varying parameter sets, but for something this simple, why is changing it in the effect text such a bad idea? Other than trying to figure out the best way to parse the text and fix it. <img src='http://blog.nickgravelyn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bjoern</title>
		<link>http://blog.nickgravelyn.com/2010/02/default-parameter-saving-in-shader-toy/comment-page-1/#comment-394</link>
		<dc:creator>Bjoern</dc:creator>
		<pubDate>Tue, 09 Feb 2010 20:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickgravelyn.com/?p=1346#comment-394</guid>
		<description>I think it was Catalin who said to use DXSAS + a custom pipeline compiler to emit non-DXSAS effect files, which is probably the way I would do it, too. But then I started to ignore my own NIH feelings recently :)</description>
		<content:encoded><![CDATA[<p>I think it was Catalin who said to use DXSAS + a custom pipeline compiler to emit non-DXSAS effect files, which is probably the way I would do it, too. But then I started to ignore my own NIH feelings recently <img src='http://blog.nickgravelyn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
