This is a flexible planet shader for space related projects
It is a multipass SM2 shader which uses 6 textures :
- Diffusemap - default colormap
- Normalmap - and its bump
- Glowmap - for cities
- Specularmap - oceans shine
- Cloudmap - for moving clouds
- Wavemap - noise in the oceans
Included one full texture set for an earth like planet using 2048x1024 textures.
Example project ( PlanetDemo1.3dr ) - a v6.45 compatible project containing the shader.
For designing new planets I highly recommend Lunarcell plugin from Flamingpear (works on PSPX and PS)
Tweakables for the shader are these :
Have fun
It is a multipass SM2 shader which uses 6 textures :
- Diffusemap - default colormap
- Normalmap - and its bump
- Glowmap - for cities
- Specularmap - oceans shine
- Cloudmap - for moving clouds
- Wavemap - noise in the oceans
Included one full texture set for an earth like planet using 2048x1024 textures.
Example project ( PlanetDemo1.3dr ) - a v6.45 compatible project containing the shader.
For designing new planets I highly recommend Lunarcell plugin from Flamingpear (works on PSPX and PS)
Tweakables for the shader are these :
Code: [Select]
//-------------------------------------
//Cloud Settings
//-------------------------------------
float cloudSpeed = 0.0025f;
float cloudHeight = 0.001f;
float cloudShadowIntensity = 0.75f;
float cloudLum = 2.0f;
//-------------------------------------
//Atmosphere settings
//-------------------------------------
float outerSize = 2.75f; //How far out will outer athmosphere go
float innerSize = 0.002f; //How far out will inner athmosphere go
float innerStrength = 0.75f; //Amount of light emitting in inner athmosohere
float innerSpread = 0.25f; //Amount of light spreading in inner athmosphere
float outerStrength = 3.5f; //Amount of light emitting in outer athmosphere
float outerSpread = 3.5f; //Amount of light spreading throughout the outer athmosphere
float atmosR = 0.4f; //Amount of Red
float atmosG = 0.7f; //Amount of Green
float atmosB = 1.0f; //Amount of Blue
float atmosA = 1.0f; //Amount of Alpha
//----------------------------------------------------------------------------------------------------------------------
// Texture Filename //Mapname from Lunarcelll
//----------------------------------------------------------------------------------------------------------------------
string DiffuseTX = ".\\3DRad_res\\fxTextures\\planets\\3_diffuse.dds"; //map color
string DiffuseNM = ".\\3DRad_res\\fxTextures\\planets\\3_bump.dds"; //bump w/o oceans (convert into normalmap)
string CloudsTX = ".\\3DRad_res\\fxTextures\\planets\\3_clouds.png"; //cloudmask (needs to be transparent)
string GlowTX = ".\\3DRad_res\\fxTextures\\planets\\3_cities.dds"; //cities
string SpecularTX = ".\\3DRad_res\\fxTextures\\planets\\3_reflection.dds"; //oceanmask (invert this)
string WavesTX = ".\\3DRad_res\\fxTextures\\planets\\WaterRipples.dds";
Have fun