Page 1 of 1

New Shader (ShaderCallback)

Posted: Mon Sep 25, 2006 1:56 pm
by chromdragon
I begin working on a new type of ShaderCallback to resolve and add some futures to Irrlicht.

Futures:
- multipass
- easy seating for constants
- easy blend mode
- multitexture support
- shader know the nod that is shading
- examples

1. multipass

- Begin()
- BeginPass(pass)
- EndPass(pass)
- End()

2. Easy seating for constants

- SetInt()
- SetFloat()
- SetTextureSlot()
- SetMatrix()
- IsParameter()
- ..

3. Easy blend mode

- SetBlendMode(blendMod)

BM_REPLACE
BM_ADD
BM_MODULATE
BM_ALPHA_BLEND

4. Examples

- multitexture & blendmode example
- per-pixel lighting shader (2-3 light sources)
- blur shader

Waiting for your ideas and suggestions!

If this a usefully thing to code? [will you use this in your apps]
I can do the OpenGL part can anyone help me for the DirectX part?

Posted: Tue Sep 26, 2006 10:16 am
by needforhint
sounds cool. I will help you to test it :lol:

Posted: Tue Sep 26, 2006 10:22 am
by needforhint
but what worries me most is not resolved in your vision... I simply want multiple callbacks :roll: . As I create a material I can assign only one callbak to it. Can I somehow solve that? It is possible to put all in one callback, but it would be more effective if every material had its own call back. But the truth is also that I have never been trying to use two shaded materials very much. I simply could not do another callback.

Posted: Thu Sep 28, 2006 8:07 pm
by chromdragon
If this a usefully thing to code? [will you use this in your apps] :roll:

Posted: Thu Sep 28, 2006 8:17 pm
by EmmanuelD
chromdragon wrote:If this a usefully thing to code? [will you use this in your apps] :roll:
The real question is more along the line of "will YOU use it?" If you have the need for such modification, do it. If not then try to spot why you don't need it - maybe it is too complex, maybe it is not that usefull, and so on.

BTW we say features, not futures :)

Posted: Fri Sep 29, 2006 12:12 pm
by omaremad
call backs are deriened class, you can have inifinte number og them, just as long as you pass the correct pointer to the material compile function.

Posted: Sun Oct 01, 2006 6:33 pm
by chromdragon
Project canceled!