Slight variations in colour and specularity on oceans.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2958 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
172c51ce14
commit
7fa2001692
@ -557,7 +557,7 @@
|
||||
1AA7FE2D10C2F2070058FBED /* OOTextureGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA7FE2B10C2F2070058FBED /* OOTextureGenerator.h */; };
|
||||
1AA7FE2E10C2F2070058FBED /* OOTextureGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AA7FE2C10C2F2070058FBED /* OOTextureGenerator.m */; };
|
||||
1AA7FE3410C2F26A0058FBED /* OOPlanetTextureGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA7FE3210C2F26A0058FBED /* OOPlanetTextureGenerator.h */; };
|
||||
1AA7FE3510C2F26A0058FBED /* OOPlanetTextureGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AA7FE3310C2F26A0058FBED /* OOPlanetTextureGenerator.m */; settings = {COMPILER_FLAGS = "-O3 -ffast-math -funroll-loops"; }; };
|
||||
1AA7FE3510C2F26A0058FBED /* OOPlanetTextureGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AA7FE3310C2F26A0058FBED /* OOPlanetTextureGenerator.m */; settings = {COMPILER_FLAGS = "-ffast-math -funroll-loops"; }; };
|
||||
1AA82C8A0CC10E700023B797 /* OOJSWorldScripts.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AA82C820CC10E3D0023B797 /* OOJSWorldScripts.m */; };
|
||||
1AAB9A980D779F4500A9F424 /* OOCocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AAB9A960D779F3C00A9F424 /* OOCocoa.m */; };
|
||||
1AAF56170F1A198400A2F2E6 /* Comparison.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF56160F1A198400A2F2E6 /* Comparison.h */; };
|
||||
|
@ -42,6 +42,7 @@ typedef struct OOPlanetTextureGeneratorInfo
|
||||
float landFraction;
|
||||
FloatRGB landColor;
|
||||
FloatRGB seaColor;
|
||||
FloatRGB deepSeaColor;
|
||||
FloatRGB paleLandColor;
|
||||
FloatRGB polarSeaColor;
|
||||
FloatRGB paleSeaColor;
|
||||
|
@ -404,6 +404,9 @@ enum
|
||||
float normalScale = 1 << _planetScale;
|
||||
if (!generateNormalMap) normalScale *= 3.0f;
|
||||
|
||||
// Deep sea colour: slightly darkened so the sea isn't just a uniform colour.
|
||||
_info.deepSeaColor = Blend(0.80f, _info.seaColor, (FloatRGB){ 0, 0, 0 });
|
||||
|
||||
unsigned x, y;
|
||||
FloatRGBA color;
|
||||
FloatRGBA cloudColor = (FloatRGBA){_info.cloudColor.r, _info.cloudColor.g, _info.cloudColor.b, 1.0f};
|
||||
@ -696,13 +699,14 @@ static FloatRGBA PlanetMix(OOPlanetTextureGeneratorInfo *info, float q, float ne
|
||||
{
|
||||
// Coastal waters.
|
||||
diffuse = Blend(-q * RECIP_SHALLOWS, info->seaColor, info->paleSeaColor);
|
||||
specular = 1.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Open sea.
|
||||
diffuse = info->seaColor;
|
||||
diffuse = Blend(-q, info->deepSeaColor, info->seaColor);
|
||||
specular = Lerp(1.0f, 0.85f, -q);
|
||||
}
|
||||
specular = 1.0f;
|
||||
}
|
||||
else if (q < COASTLINE_PORTION)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user