Robotic Pandas

On abstractions for building next generation user interfaces

My first DirectX 10 Shader in Bling

Posted by mcdirmid on 13/07/2009

Here is the code:

var Buffer = Geometries.Sphere.ToBuffer(100);
Buffer.ForAll = (i, v) => v.Color().Bind = slider.Value.Lerp(i.SelectColor(), Colors.Red);
var EF = Effect.Shade(vertex => vertex.Color() * (vertex.Normal().Z));

And here is the result:


Ya, it doesn’t look like much yet, but it’s a good start. I got a lot of help from reading Conal Elliott’s vertigo paper, so it looks like this has been done before in Haskell vs. C#. In particular, we can get a lot of mileage out of parametric surfaces (automatically compute positions and normals using automatic differentiation).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: