Terrain

Everything about development and the OpenMW source code.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Terrain

Post by werdanith »

Yacoby wrote:Solution: Don't touch ATI with a bargepole?
What about nouveau and low-end intel?
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: Terrain

Post by Chris »

werdanith wrote:I think the fact that the terrain makes heavy use of shaders, which is bad news for half the linux ecosystem of graphics drivers and hardware is worth mentioning...
The main problem is that the fragment shaders are too large. It defines a shader to handle per pixel lighting for 8 lights[1], which causes Cg to build an ARBfp1 shader that has "too many ALU instructions". I haven't been able to get Ogre to have Cg make GLSL shaders instead of ARBfp1 (Ogre complains there's no usable profile or something if I add "glsl" to the profile list, even if I leave in "arbfp1"), which I was trying in the hopes that MESA's GLSL compiler would create better shaders.

Lowering the number of lights down to 4 gets the shaders working, though the colors go wonky for some reason.

[1] The fixed-function pipeline in OpenGL/D3D only allow per vertex lighting for up to 8 lights, by comparison. Per-pixel lighting for 8 lights is a lot more intensive.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Terrain

Post by Zini »

Tested the terrain with OGRE 1.8. No more crashes as far as I can tell. Well done. A bit more testing first would be nice, but I think this branch is ready for a merge.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Terrain

Post by Zini »

Bad news. With the Redemption esm the terrain code is crashing all over the place.

I narrowed it down to this line:

Code: Select all

if ( land->landData->usingColours )
(in terrain.cpp, TerrainManager::cellAdded)

Apparently land is a 0-pointer here.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Terrain

Post by scrawl »

if ( land != 0 && land->landData->usingColours )

does this work?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Terrain

Post by Zini »

Yeah, that fixed it nicely. Merging terrain into master now.

btw. this shows again that we need to broaden or testing scope. I really hope we get the ESP support working soon, because else that is not going to happen.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Terrain

Post by Zini »

Rendering bug near the Seyda Neen lighthouse. Looks like a depth fight between water and terrain. Flickers like hell.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Terrain

Post by scrawl »

Will be fixed once we have depth maps for the water. (I will probably do that for 0.15, along with reflection & refraction maps)
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Terrain

Post by Zini »

Okay. Can you add a new issue to the tracker for that and set it to 0.15.0?
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Terrain

Post by jhooks1 »

scrawl wrote:Will be fixed once we have depth maps for the water. (I will probably do that for 0.15, along with reflection & refraction maps)
Reflection and refraction were done before, it made the framerate drop a lot. So I disabled both.
Post Reply