Hello,
I create a fading effect using an overlay. I'm using approach described in Problem implementing fade in/out effect using Overlay and setAlphaOperation and setColourOperationEx d3d vs opengl. It does work on my laptop, but on my desktop computer I get a blank white screen until I hide the overlay. There are no messages in the log that would indicate a problem with the materials. Desktop has this problem in DirectX only (opengl shows proper fading).
And I suppose the related issue (on my desktop with directx rendering only) is that when I show an overlay (that simulates a progress bar [from BSP demo]) which occludes only part of the screen I get white background, even though I set background of the viewport to be black.
Any suggestions?
Thank you.
Fading with an overlay works on one computer but not another
- sjcomp
- Gnome
- Posts: 315
- Joined: Sat Apr 23, 2005 2:35 pm
- Location: Dover, NH
- Contact:
Fading with an overlay works on one computer but not another
Regards, Alexander. http://sjcomp.com
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- sjcomp
- Gnome
- Posts: 315
- Joined: Sat Apr 23, 2005 2:35 pm
- Location: Dover, NH
- Contact:
Thanks Sinbad, but I do not see such a constant in 1.4.7. I'd expect the video card on the desktop to support this operation, and I'm quite sure I'm not using manual alpha parameter in more than one texture unit anyway. Is there anything else I can do to find the root of the problem?sinbad wrote:Are you using manual colour/alpha parameters in more than one texture unit in the same pass? Some cards don't support per-texture unit manual settings in DirectX, you can test RSC_PERSTAGECONSTANT in RenderSystemCapabilities to see.
Thanks.
Regards, Alexander. http://sjcomp.com
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- sjcomp
- Gnome
- Posts: 315
- Joined: Sat Apr 23, 2005 2:35 pm
- Location: Dover, NH
- Contact:
That will be swellsinbad wrote:Gah, I really have to get v1.6 out soon
I'm using only manual alpha in only one texture unit. This is the materialsinbad wrote: Alpha and colour are the same as regards the 'manual' slot. So, are you using manual colours or manual alpha in more than one texture unit?
Code: Select all
material Fader
{
technique
{
pass
{
scene_blend alpha_blend
lighting off
depth_check off
depth_write off
texture_unit
{
texture Black.png
alpha_op_ex modulate src_manual src_texture 0 0
}
}
}
}
Code: Select all
m_TexUnit->setAlphaOperation(Ogre::LBX_MODULATE, Ogre::LBS_TEXTURE, Ogre::LBS_MANUAL, 1 - Fading, Fading);
Thank you.
Regards, Alexander. http://sjcomp.com
- sjcomp
- Gnome
- Posts: 315
- Joined: Sat Apr 23, 2005 2:35 pm
- Location: Dover, NH
- Contact:
I changed Black.png to be 2x2 and both progress bar background (which was using black.png and fader) started to work. But there is some white noise at random locations on the screen. Examples follow. There could be runs when everything works and there could be runs when I get white strips.
This is an overlay that is done the same way as LoadingProgressBar in BSP demo. It has nothing to do with CEGUI (other than appearance) It's actually displayed before cegui is even initialized.
An overlay with an image in png format (even if I change it to jpg, I still have noise)
This is an image that is shown with CEGUI as Static Image:
This is a menu that is drawn by cegui
The white lines move around. And sometimes are not present at all (Every third run the overlays look fine, but cegui menus have noise, the rest of the time cegui menus are ok, but overlays have noise) I observe this only on my desktop computer.
This is an overlay that is done the same way as LoadingProgressBar in BSP demo. It has nothing to do with CEGUI (other than appearance) It's actually displayed before cegui is even initialized.
An overlay with an image in png format (even if I change it to jpg, I still have noise)
This is an image that is shown with CEGUI as Static Image:
This is a menu that is drawn by cegui
The white lines move around. And sometimes are not present at all (Every third run the overlays look fine, but cegui menus have noise, the rest of the time cegui menus are ok, but overlays have noise) I observe this only on my desktop computer.
Regards, Alexander. http://sjcomp.com
- sjcomp
- Gnome
- Posts: 315
- Joined: Sat Apr 23, 2005 2:35 pm
- Location: Dover, NH
- Contact:
The problems disappeared once I disabled min maps for the png texture (leaving it 1x1 size).
Regards, Alexander. http://sjcomp.com
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact: