<?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: Shaders must die, part 2</title>
	<atom:link href="http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/</link>
	<description>Random thoughts of a triangle pusher</description>
	<lastBuildDate>Thu, 04 Mar 2010 23:01:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: forest</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18938</link>
		<dc:creator>forest</dc:creator>
		<pubDate>Mon, 11 May 2009 01:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18938</guid>
		<description>This coupled with the option to specify all of the things like culling, blending, ztest, zwrite, alpha test, and fog would be very very useful for the majority of unity users.</description>
		<content:encoded><![CDATA[<p>This coupled with the option to specify all of the things like culling, blending, ztest, zwrite, alpha test, and fog would be very very useful for the majority of unity users.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aras Pranckevičius</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18928</link>
		<dc:creator>Aras Pranckevičius</dc:creator>
		<pubDate>Sun, 10 May 2009 15:38:06 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18928</guid>
		<description>Yeah. The common approach is using library functions or macros. What I am trying to do is just inverting the whole process: usually you put macros/functions inside of your shader code. I&#039;m trying to automatically put macros/functions around shader snippets. Also, to separate out surface properties from the BRDF.

I have no idea if this will lead to anything, but hey, it&#039;s fun at least!</description>
		<content:encoded><![CDATA[<p>Yeah. The common approach is using library functions or macros. What I am trying to do is just inverting the whole process: usually you put macros/functions inside of your shader code. I&#8217;m trying to automatically put macros/functions around shader snippets. Also, to separate out surface properties from the BRDF.</p>
<p>I have no idea if this will lead to anything, but hey, it&#8217;s fun at least!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18927</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Sun, 10 May 2009 15:33:24 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18927</guid>
		<description>Yeah, I agree that there are common calculations that you would do regardless of the number of passes you do it in or whether you&#039;re doing forward or deferred rendering, but then we usually use utility functions for that. From what you&#039;re saying then, this sounds like a more friendly way to modularise regular shader code, at the macro end (standardising the phases) and at the detail end (which lighting model to use) - which definitely sounds useful in most normal render paths. It probably just starts to get trickier when you start adding things like domain-specific animation (e.g. foliage), but then I guess you would just write a different macro-level set up for those kinds of things. 

Interesting stuff anyway!</description>
		<content:encoded><![CDATA[<p>Yeah, I agree that there are common calculations that you would do regardless of the number of passes you do it in or whether you&#8217;re doing forward or deferred rendering, but then we usually use utility functions for that. From what you&#8217;re saying then, this sounds like a more friendly way to modularise regular shader code, at the macro end (standardising the phases) and at the detail end (which lighting model to use) &#8211; which definitely sounds useful in most normal render paths. It probably just starts to get trickier when you start adding things like domain-specific animation (e.g. foliage), but then I guess you would just write a different macro-level set up for those kinds of things. </p>
<p>Interesting stuff anyway!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lost in the Triangles &#187; Blog Archive &#187; Shaders must die, part 3</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18926</link>
		<dc:creator>Lost in the Triangles &#187; Blog Archive &#187; Shaders must die, part 3</dc:creator>
		<pubDate>Sun, 10 May 2009 15:25:15 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18926</guid>
		<description>[...] &#171; Shaders must die, part 2 [...]</description>
		<content:encoded><![CDATA[<p>[...] &laquo; Shaders must die, part 2 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aras Pranckevičius</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18922</link>
		<dc:creator>Aras Pranckevičius</dc:creator>
		<pubDate>Sun, 10 May 2009 12:36:21 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18922</guid>
		<description>@steve: I don&#039;t know; Renderman just &quot;feels&quot; more natural. Yes, it does have both surface properties and lighting response in a single shader, so it&#039;s not like &quot;totally separated out&quot;.

My issue with current way of writing shaders is that it&#039;s very much tied into how things are operating. For example, if you have a simple textured surface with Lambertian BRDF - you still have to write shaders differently if you&#039;re doing single pass per light forward renderer, or multiple lights per pass forward renderer, or hybrid renderer, etc. Even though there&#039;s no good reason to do that; it should be enough just to state &quot;albedo comes form texture&quot; and &quot;use Lambertian BRDF&quot;.

So that&#039;s what I&#039;m playing around with. What I have so far does not do any fancy translation/generation/compilation, it just merely pastes all the boilerplate code around (i.e. it produces pretty much the same shader as it would be hand-written). In majority of cases, lots of things done in a shader are really standard (transform position, compute fog, set up blending modes, transform UVs, do tangent space transforms, pass down light vectors etc.).</description>
		<content:encoded><![CDATA[<p>@steve: I don&#8217;t know; Renderman just &#8220;feels&#8221; more natural. Yes, it does have both surface properties and lighting response in a single shader, so it&#8217;s not like &#8220;totally separated out&#8221;.</p>
<p>My issue with current way of writing shaders is that it&#8217;s very much tied into how things are operating. For example, if you have a simple textured surface with Lambertian BRDF &#8211; you still have to write shaders differently if you&#8217;re doing single pass per light forward renderer, or multiple lights per pass forward renderer, or hybrid renderer, etc. Even though there&#8217;s no good reason to do that; it should be enough just to state &#8220;albedo comes form texture&#8221; and &#8220;use Lambertian BRDF&#8221;.</p>
<p>So that&#8217;s what I&#8217;m playing around with. What I have so far does not do any fancy translation/generation/compilation, it just merely pastes all the boilerplate code around (i.e. it produces pretty much the same shader as it would be hand-written). In majority of cases, lots of things done in a shader are really standard (transform position, compute fog, set up blending modes, transform UVs, do tangent space transforms, pass down light vectors etc.).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18921</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Sun, 10 May 2009 11:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18921</guid>
		<description>Technically this is all very impressive, but I do have an slight issue with the assertion that a Renderman approach is somehow more &#039;natural&#039; and not driven by technology. In fact the approach was driven by the way the Renderman renderer worked, in the same way real-time shaders are driven by the way their renderers work. Neither one is really a &#039;purer&#039; form, they&#039;re just different because they evolved from different base techniques. 

I do agree that for most &#039;normal&#039; render paths an abstraction like this could be useful though, although my inherent distrust of passing code through too many compilers / translators / generators would make me scrutinise the results very closely.</description>
		<content:encoded><![CDATA[<p>Technically this is all very impressive, but I do have an slight issue with the assertion that a Renderman approach is somehow more &#8216;natural&#8217; and not driven by technology. In fact the approach was driven by the way the Renderman renderer worked, in the same way real-time shaders are driven by the way their renderers work. Neither one is really a &#8216;purer&#8217; form, they&#8217;re just different because they evolved from different base techniques. </p>
<p>I do agree that for most &#8216;normal&#8217; render paths an abstraction like this could be useful though, although my inherent distrust of passing code through too many compilers / translators / generators would make me scrutinise the results very closely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sagacity</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18891</link>
		<dc:creator>Sagacity</dc:creator>
		<pubDate>Fri, 08 May 2009 08:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18891</guid>
		<description>This is a pretty interesting way of doing things. Why do developers insist on reinventing the wheel in even more complex ways all the time when a small simple solution like this one is just waiting to be discovered? :)</description>
		<content:encoded><![CDATA[<p>This is a pretty interesting way of doing things. Why do developers insist on reinventing the wheel in even more complex ways all the time when a small simple solution like this one is just waiting to be discovered? :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Qarpon</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18888</link>
		<dc:creator>Qarpon</dc:creator>
		<pubDate>Fri, 08 May 2009 06:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18888</guid>
		<description>although I can barely understand this, I still sense you&#039;re on a very right path. this just feels right! :)</description>
		<content:encoded><![CDATA[<p>although I can barely understand this, I still sense you&#8217;re on a very right path. this just feels right! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Garney</title>
		<link>http://aras-p.info/blog/2009/05/07/shaders-must-die-part-2/comment-page-1/#comment-18873</link>
		<dc:creator>Ben Garney</dc:creator>
		<pubDate>Thu, 07 May 2009 22:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://aras-p.info/blog/?p=339#comment-18873</guid>
		<description>Very smart... I&#039;m excited to see how this pans out. Getting more into the Renderman mode is smart. It&#039;s a proven model, a lot more mature than the current shader models games use.</description>
		<content:encoded><![CDATA[<p>Very smart&#8230; I&#8217;m excited to see how this pans out. Getting more into the Renderman mode is smart. It&#8217;s a proven model, a lot more mature than the current shader models games use.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
