Aspectratio, metallic effect

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
kevin[be]
Posts: 23
Joined: Sun Dec 21, 2008 2:42 pm

Aspectratio, metallic effect

Post by kevin[be] »

Hi, I've got a few questions

1. When I create a device sized (1920, 1080) (which is 16:9), should I set the aspect ratio of my camera also at 16:9? When I do so, the view is deformed.

2. I want a nicer representation of red sphere's, so I'm looking for a 'metallic glow effect', but I can't create it using shaders. Any idea's?

3. When I run a infinite loop (while (...) {}, like the one in irrlicht) on my first computer, task manager indicates only 50% cpu usage. It's not a dual core. When I run it on another computer, with xp professional (the first one has xp basic) , 100% CPU usage is indicated. Am I missing something? :p

Thanks in advance
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, use 16:9 ratio. Maybe you did something wrong?
The effect should also be possible with specular highlights, but works much better with per-pixel lighting. there are hundreds of shaders of this kind available.
I guess it's HyperThreading.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Re: Aspectratio, metallic effect

Post by vitek »

kevin[be] wrote:When I do so, the view is deformed.
Sounds like you're doing something wrong. Are you using integer math? You should be able to write camera->setAspectRatio(16.f / 9);, or more generically, you could use the following code.

Code: Select all

  core::rect<s32> viewPort = driver->getViewPort(); 
  camera->setAspectRatio(1.f * viewPort.getWidth() / viewPort.getHeight()); 
Travis
kevin[be]
Posts: 23
Joined: Sun Dec 21, 2008 2:42 pm

Post by kevin[be] »

Thanks guys
m_krzywy
Posts: 133
Joined: Sat Nov 04, 2006 2:05 pm

Post by m_krzywy »

Thanks.
Post Reply