Thursday, February 02, 2006

Today I started working on an effect/material system. It's inspired by the most common effect formats, CgFX and DirectX Effects. Think of an effect as a kind of high level shader. It encapsluates the whole rendering process for a specific visual apperance. An effect is devided in a set of techniques. A technique is a way to render the desired visual effect. A technique is then devided into passes. This is indeed very flexible. For example, imagine a human skin effect. Close to the camera the effect uses a technique that renders using costly vertex and fragment shaders and/or multiple passes that gives a very high visual quality. Farther away, the effect uses a cheeper teqnique with a single pass and cheep shaders at the cost of visual quality. But since the camera is now far away from the object the loss of quality will not be noticeble. All this is encpsluated in the effect.

The screenshot shows a simple test of this effect system. The sphere is rendered with a single effect that uses a two-pass technique. The first pass just sets the diffuse color to red and fillmode to solid. The second pass uses a yellow color and wireframe fillmode and depthtesting disabled.

So far it's all very simple, but now I have something to build on =)

By the way, I downloaded the new IE7.0 beta and kind of liked it.
Until I tried to edit my blog that is. It simply won't work. Luckily there is firefox=)
But it's still in beta so I guess I shouldn't be to harsh...

No comments: