PDA

View Full Version : Implementing a Dynamic Shader System



xerzi
02-15-2012, 07:08 PM
Well the closest I could discribe what I am looking at implementing is something like Unreal Engine 3, which has has a program which implements a "linked" block system. Each block is used to define operations or textures, such as doing a "multiply" between two images.

I'm pretty sure they implemented some sort of compiler which converts this material system they created into a hlsl source file, which is than compiled and used by the gpu. I can only imagine the work that went into a system such as this. I am trying to do something similar, although maybe not as efficient or elegant as Epic games was able to accomplish. I find that there is always a need for shaders, as it contributes to nearly all the visuals a user will see and experience. If anyone knows of middleware that could be used to implement a dynamic shader system as this.

I am a bit out of my element in terms of shaders I'd appreciate any input if this is a good or bad idea. I'm not familiar with the Cry Engine but I'd assume they have some sort of shader system from what I've seen of the engine.