i want to make text drop shadows, and make window background half transparent like a ground glass.if we have a interface to set pixshaders with these widgets,these effects will be possible.
minutes ago i`m digging OgreCeguiRenderer, and i found every thing in CEGUI only means quads and textures to renderer,i have no idea to decide which one is character which one is window which one should be shade,it seems renderers can not obtain too many infos from cegui,may be there`s nothing to deal with the renderer.
so do we already have such a interface,or some otherway to do the same things,in CEGUI?
any help plz.
is it possible to add shader effects on widgets?
Moderators: CEGUI MVP, CEGUI Team
is it possible to add shader effects on widgets?
Last edited by Cloudage on Fri May 29, 2009 04:01, edited 1 time in total.
Re: is it possible to add shader effects on widgets?
I don't think there is an easy answer to this question; if there is, I am unaware of it. As you've figured out the renderer does not hold any contextual information as to what is being rendered when. Additionally, CEGUI uses a delayed rendering scheme so even if you activated the shaders in the windows draw methods it would have no effect as the window is not actually rendered at that time. This thread gives a basic breakdown of the rendering process in v0.6 (i think).
The rendering system is being re-written for v0.7, but unfortunately I do not think this type of support is being added. I am not sure why CEGUI does not, and is not planning on, supporting a callback/event-based (or any other) mechanism providing users with custom rendering capabilities. Maybe there just has not been enough demand for it. Perhaps CE will comment on this? (hint hint)
I know that other people have done drop-shadows on text as in this thread, and you can easily make windows transparent by setting their Alpha property. Another option may be to first render the effect to a texture, and then use that texture in a CEGUI::Imageset which is then used to texture the window. Other than that I am not really sure...
The rendering system is being re-written for v0.7, but unfortunately I do not think this type of support is being added. I am not sure why CEGUI does not, and is not planning on, supporting a callback/event-based (or any other) mechanism providing users with custom rendering capabilities. Maybe there just has not been enough demand for it. Perhaps CE will comment on this? (hint hint)
I know that other people have done drop-shadows on text as in this thread, and you can easily make windows transparent by setting their Alpha property. Another option may be to first render the effect to a texture, and then use that texture in a CEGUI::Imageset which is then used to texture the window. Other than that I am not really sure...
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: is it possible to add shader effects on widgets?
Just to confirm, there is currently (0.6.x) no way to reliably use shaders for any effects when rendering.
It is my intention that there will be some level of support for shaders in 0.7 - I have yet to play around with this area before I can determine exactly what form this will ultimately take. Perhaps, depending how things go, it might be possible to demonstrate a few existing possibilities shortly (I might have a go tomorrow / over the weekend, though obviously, if it all falls on it's arse, demonstrations may not be possible )
CE.
Jamarr wrote:The rendering system is being re-written for v0.7, but unfortunately I do not think this type of support is being added. I am not sure why CEGUI does not, and is not planning on, supporting a callback/event-based (or any other) mechanism providing users with custom rendering capabilities. Maybe there just has not been enough demand for it. Perhaps CE will comment on this? (hint hint)
It is my intention that there will be some level of support for shaders in 0.7 - I have yet to play around with this area before I can determine exactly what form this will ultimately take. Perhaps, depending how things go, it might be possible to demonstrate a few existing possibilities shortly (I might have a go tomorrow / over the weekend, though obviously, if it all falls on it's arse, demonstrations may not be possible )
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: is it possible to add shader effects on widgets?
CrazyEddie wrote:Just to confirm, there is currently (0.6.x) no way to reliably use shaders for any effects when rendering.Jamarr wrote:The rendering system is being re-written for v0.7, but unfortunately I do not think this type of support is being added. I am not sure why CEGUI does not, and is not planning on, supporting a callback/event-based (or any other) mechanism providing users with custom rendering capabilities. Maybe there just has not been enough demand for it. Perhaps CE will comment on this? (hint hint)
It is my intention that there will be some level of support for shaders in 0.7 - I have yet to play around with this area before I can determine exactly what form this will ultimately take. Perhaps, depending how things go, it might be possible to demonstrate a few existing possibilities shortly (I might have a go tomorrow / over the weekend, though obviously, if it all falls on it's arse, demonstrations may not be possible )
CE.
it`s good news for me.thank you ce.
and also thanks jamarr,may be i can use their tricks to fake text shadows until we can have a real shader interface.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: is it possible to add shader effects on widgets?
I know it's probably obvious, but I wanted to clarify that in this post where I mention the 'current code' and in my earlier post when I said 'existing possibilities' those are referring to the svn trunk code, and not any 0.6.x (or earlier) release.
I played about yesterday with some shaders via the CEGUI::Effect interface. So far this has been using OpenGL only, since that's the API that I use as the baseline / reference for working on the rendering related parts of the system. The experiments I have done so far have allowed me to establish some basic facts about the current situation.
1) There are already some pretty cool shader based effects and animations possible using this interface.
2) There are some definite limitations. Some areas here can and should be improved.
3) I have much to learn when it comes to shaders!
Obviously here, number 2 - the limitations - are of most interest. These limitations boil down to two main issues:
1) The rendering from an unmodified and unextended CEGUI that can be affected by shaders is currently at the level which has the CEGUI::Effect system applied. This means that to affect a window/widget rendered using the stock Window and stock WindowRenderer types it must be promoted to having it's own render surface backing (texture) - this is not a massive issue, since it's just a property setting to get that support. I did not yet see if there would be an appropriate way to hook into the rendering process elsewhere (obviously it's possible, but it has to be appropriate).
2) We currently only have support for a single rendering pass (this is not a shader specific limitation). This is something that definitely can and will be addressed, since I believe that many of the more advanced effects need >1 pass (I could be wrong; as mentioned, I'm no expert).
I'll be doing some more experimentation and making modifications where I feel it's appropriate
CE.
I played about yesterday with some shaders via the CEGUI::Effect interface. So far this has been using OpenGL only, since that's the API that I use as the baseline / reference for working on the rendering related parts of the system. The experiments I have done so far have allowed me to establish some basic facts about the current situation.
1) There are already some pretty cool shader based effects and animations possible using this interface.
2) There are some definite limitations. Some areas here can and should be improved.
3) I have much to learn when it comes to shaders!
Obviously here, number 2 - the limitations - are of most interest. These limitations boil down to two main issues:
1) The rendering from an unmodified and unextended CEGUI that can be affected by shaders is currently at the level which has the CEGUI::Effect system applied. This means that to affect a window/widget rendered using the stock Window and stock WindowRenderer types it must be promoted to having it's own render surface backing (texture) - this is not a massive issue, since it's just a property setting to get that support. I did not yet see if there would be an appropriate way to hook into the rendering process elsewhere (obviously it's possible, but it has to be appropriate).
2) We currently only have support for a single rendering pass (this is not a shader specific limitation). This is something that definitely can and will be addressed, since I believe that many of the more advanced effects need >1 pass (I could be wrong; as mentioned, I'm no expert).
I'll be doing some more experimentation and making modifications where I feel it's appropriate
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: is it possible to add shader effects on widgets?
I made a video that shows a window with a shader based effect running. It's kind of crappy, but it show the very basic building blocks are in place. I hope to perhaps demonstrate something a bit more advanced sometime soon
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: is it possible to add shader effects on widgets?
And to follow up, once more - here's a video showing a glass-like effect:
I hope the video shows the effect clear enough for others to make out
CE.
I hope the video shows the effect clear enough for others to make out
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: is it possible to add shader effects on widgets?
The wave effect is kinda silly, but it demonstrates your point. The glass effect, however, is pretty cool. Good job
-
- Quite a regular
- Posts: 74
- Joined: Mon Apr 28, 2008 23:21
- Location: Australia
Re: is it possible to add shader effects on widgets?
Great work man.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: is it possible to add shader effects on widgets?
Thanks for the comments. Yeah, the wave is a little lame and useless - at least on a frame window, though could be useful if applied (more subtly) to a button, perhaps as a hover / mouse-over effect
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 11 guests