Dude, this is awesome!
I was able to make it visible away from the terminator. Try this code in Surface.fx, starting at line 1079:
I was able to make it visible away from the terminator. Try this code in Surface.fx, starting at line 1079:
PHP:
float dCS = dot(nrm, vSunDir); // Cloud normal sun angle
//float dMN = dot(frg.nrmW, vSunDir); // Planet mean normal sun angle
// increase brightness of sun illumination with low sun angle, twice is nicer
// Lambertian looks dull, this looks better
dCS = saturate((dCS * (1.0f -dCS)) + dCS); // new
dCS = saturate((dCS * (1.0f -dCS)) + dCS); // new
// Effect of normal/sun angle to color
// Add some brightness (borrowing red channel from sunset attenuation)
// Adding it to the sun illumination factor, taking care to keep from saturating
cTex.rgb *= (0.2f * frg.atten.r) + (0.8f * dCS); // new
}
#endif
#if defined(_CLOUDMICRO)
float f = cTex.a;
float g = lerp(1, cMic.a, frg.fade.y);
float h = (g + 4.0f)*0.2f;
cTex.a = saturate(lerp(g, h, f) * f);
#endif
// make the light falloff to be grayscale; to me, cloud tops look better this way than colored
// borrow the red channel because it penetrates farther through atmosphere
// multiply it by 3 to keep it brighter closer to the terminator
float3 color = cTex.rgb*saturate(frg.atten.r*3)*fCloudInts + frg.insca.rgb*vHazeMax; // new
return float4(saturate(color + a), cTex.a*saturate(fCloudInts*fCloudInts));
//return float4(saturate(color + a), cTex.a*saturate(frg.fade.x*fCloudInts*fCloudInts));
}