Luben wrote:
I can't see what optimizations i can get from making a whole new material renderer instead of using the driver independant solution that irrlicht provides.
The point is that it will be confidant to adding a shader to a scene node.
E.g you could apply the same Material Renderer to a scene node and to the post processor.
I don't quite get your point.. maybe. Do you mean that i should make a shader-effect from which you can get the 'MaterialType' and use it with your meshes?
Not quite
I mean that you should make your post processing method accept MaterialType's/IMaterialRenderer*'s (as you might know, the MaterialType is only a index of an array of IMaterialRenderer-Pointers in the Video Driver - so when you use a MaterialType you kind of work with an IMaterialRenderer-Pointer)
s32 id = gpu->addHighLevelShaderMaterial(...);
// pass to node
node->setMaterialType((E_MATERIAL_TYPE)id);
// pass to post processor
driver->addPostProcessor(id, rect2d<f32>(0,0, 400, 400), ...);
i hope you get what I want to say
btw. your example is very impressive, keep up the good work.
If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot.
Now, water can flow or it can crash. Be water my friend.
Aah, now i understand
Well, i'll provide a function for creating a shader based post process effect, and then you could use that interface's functions to set your own materialtype, i suppose.
If you don't have anything nice to say, don't say anything at all.
Luben wrote:Aah, now i understand
Well, i'll provide a function for creating a shader based post process effect, and then you could use that interface's functions to set your own materialtype, i suppose.
sounds good, thanks.
If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot.
Now, water can flow or it can crash. Be water my friend.
I was thinking about making some generic PP code rather than hard coding my postprocessors. I was thinking of the following:
Passmanager
-has pointers to all the RTT's (RTT pool)
-has a list of passes
-functions to add / remove a pass
-main rendeer loop
pass
-has RTT
-has node list (list of nodes to render in the pass)
-an update function (space to put extra code)
-shader call back
-pointer to RTT pool
-loads strings of shaders (driver independent if you tell it which shader to load)
most of the time you can use the standard pass class, or if the pass is complex you could use inheritance to make diffrent pass types and the passmanager treats them the same way.
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
I'll release a beta-ish thing soon. Right now i can load effect files, but not effect-chains, sortof. I'll just fix a few things and put together a demo-ish application.
If you don't have anything nice to say, don't say anything at all.