Finally somehow planet is done
This commit is contained in:
1 parent
592e008914
commit
2b40c13c9d
9 files changed
+315
-330
No files matched your search
@@ -32,6 +32,11 @@ void main() {
|
||||
vec4 bakedTextureColor = texture2D(BakedTexture, finalTexCoord);
|
||||
vec4 textureColor = texture2D(Texture, TexCoord);
|
||||
|
||||
if (bakedTextureColor.x < 0.01 && bakedTextureColor.y < 0.01 && bakedTextureColor.y < 0.01)
|
||||
{
|
||||
textureMixFactor = 1.0;
|
||||
}
|
||||
|
||||
vec4 finalColor = textureMixFactor*textureColor + (1 - textureMixFactor) * bakedTextureColor;
|
||||
|
||||
float fogFactor;
|
||||
@@ -65,6 +70,8 @@ void main() {
|
||||
fogFactor = clamp((realDist - 1000) / (800.0), 0.0, 1.0);
|
||||
|
||||
gl_FragColor = mix(vec4(finalColor.rgb, 1.0), FOG_COLOR, fogFactor);
|
||||
|
||||
}
|
||||
|
||||
//gl_FragColor = vec4(finalColor.rgb, 1.0);
|
||||
}
|
||||
Reference in new issue
Block a user