Here’s a more complex shader example. It’s a version of Charlie’s Dream Team cobra, which uses all the data Oolite provides – laser heat, hull heat, engine power and time. It also implements per-pixel specular lighting, although with neither specular mapping nor smoothing this isn’t very obvious. If anyone feels like sending me a model with a specular map…
During the development of the shaders I discovered a problem: Oolite uses light 0 as the “showroom” light (for the demo and shipyard screens) and light 1 as the sun. There is no way in GLslang to know whether a light is enabled. My workaround for this is to ignore light 0 all the time, meaning the ship is illuminated from the direction of Lave’s sun relative to the station (!) during the demo screen.
The shaders work with Oolite 1.67 and 1.67.1 for OS X, although the hull temperature glow is disabled.
http://wiki.alioth.net/images/3/3a/Shady-cobra.oxp.zip
Limitation: the laser glow for all four lasers is based on the laser currently in use, i.e. the last in-ship camera you selected.
New shader sample
Moderators: winston, another_commander
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
New shader sample
E-mail: [email protected]
- Uncle Reno
- ---- E L I T E ----
- Posts: 648
- Joined: Mon Apr 24, 2006 12:54 pm
- Location: UK
Looks great but a little point, out of left and right views there is a diagonal blue line in the bottom left and right hand corners respectively, should they be there? I can't see why they should be shown, they don't seem to match up to any part of the ship.
"Get back or I unleash my lethal spotted batoid!!"
What I do when not reading the Oolite bulletin board!
What I do when not reading the Oolite bulletin board!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
*mangles textures a bit*
Those are the forward side panels of the ship, or strips of them. I don’t know why it’s happening. It happens with the un-shady version, too.
Those are the forward side panels of the ship, or strips of them. I don’t know why it’s happening. It happens with the un-shady version, too.
E-mail: [email protected]
- Uncle Reno
- ---- E L I T E ----
- Posts: 648
- Joined: Mon Apr 24, 2006 12:54 pm
- Location: UK
I've also seen the glow appearing through the fuel scoop housing when using the looking up at the bottom of your ship view.
"Get back or I unleash my lethal spotted batoid!!"
What I do when not reading the Oolite bulletin board!
What I do when not reading the Oolite bulletin board!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
The glow map may appear around the edges, but I suspect what you’re seeing is the flasher. Again, Charlie’s fault. :-)
E-mail: [email protected]
- Uncle Reno
- ---- E L I T E ----
- Posts: 648
- Joined: Mon Apr 24, 2006 12:54 pm
- Location: UK
Well, if it's of any use/interest, there's a screenshot of it at http://www.box.net/shared/sqo187ljaa.
"Get back or I unleash my lethal spotted batoid!!"
What I do when not reading the Oolite bulletin board!
What I do when not reading the Oolite bulletin board!