Harald Johnson:

Changes
=======

- corrected some strange behavior when playing with the render dialog options
- the density slider is now working : if you are fps limited and still want to see clouds in
  the distance you should play with that
- added the choice for texture resolution, its more comprehensible now (before it was
  wrongly allways choosing 64x64 textures)
- changed the initial texture size : you now have 64 texture of 64x64, this uses 1Mo of
  texture memory (before it was 20 texture of  256x256, that took more memory and there was
  not enought impostors)
- sun vector is now right so the lighting is a bit better
- removed useless sort and light computations for impostors, this should save a lot of cpu
- blending of distant cloud is more accurate now
- clouds are now positioned correctly, they don't try to escape you anymore
- no more red/white boxes around cloud
- textures are now filtered (no more big pixels)

known bugs
==========

- distant objects are seen in front of clouds
This commit is contained in:
ehofman
2005-04-26 08:30:38 +00:00
parent 9048ee533d
commit d37992aaf9
6 changed files with 210 additions and 110 deletions
+35 -3
View File
@@ -26,12 +26,38 @@
SGEnviro sgEnviro;
SGEnviro::SGEnviro(void) {
SGEnviro::SGEnviro(void) :
view_in_cloud(false),
precipitation_enable_state(false),
precipitation_density(100.0)
{
}
SGEnviro::~SGEnviro(void) {
}
void SGEnviro::startOfFrame(void) {
view_in_cloud = false;
if(SGNewCloud::cldCache)
SGNewCloud::cldCache->startNewFrame();
}
void SGEnviro::endOfFrame(void) {
}
// this can be queried to add some turbulence for example
bool SGEnviro::is_view_in_cloud(void) const {
return view_in_cloud;
}
void SGEnviro::set_view_in_cloud(bool incloud) {
view_in_cloud = incloud;
}
int SGEnviro::get_CacheResolution(void) const {
return SGCloudField::get_CacheResolution();
}
int SGEnviro::get_clouds_CacheSize(void) const {
return SGCloudField::get_CacheSize();
}
@@ -45,6 +71,10 @@ bool SGEnviro::get_clouds_enable_state(void) const {
return SGCloudField::get_enable3dClouds();
}
void SGEnviro::set_CacheResolution(int resolutionPixels) {
SGCloudField::set_CacheResolution(resolutionPixels);
}
void SGEnviro::set_clouds_CacheSize(int sizeKb) {
SGCloudField::set_CacheSize(sizeKb);
}
@@ -60,15 +90,17 @@ void SGEnviro::set_clouds_enable_state(bool enable) {
// rain/snow
float SGEnviro::get_precipitation_density(void) const {
return 0.0;
return precipitation_density;
}
bool SGEnviro::get_precipitation_enable_state(void) const {
return false;
return precipitation_enable_state;
}
void SGEnviro::set_precipitation_density(float density) {
precipitation_density = density;
}
void SGEnviro::set_precipitation_enable_state(bool enable) {
precipitation_enable_state = enable;
}
// others
+15 -2
View File
@@ -24,18 +24,32 @@
class SGEnviro {
private:
bool view_in_cloud;
bool precipitation_enable_state;
float precipitation_density;
public:
SGEnviro();
~SGEnviro();
void startOfFrame(void);
void endOfFrame(void);
// this can be queried to add some turbulence for example
bool is_view_in_cloud(void) const;
void set_view_in_cloud(bool incloud);
// Clouds
// return the size of the memory pool used by texture impostors
int get_clouds_CacheSize(void) const;
int get_CacheResolution(void) const;
float get_clouds_visibility(void) const;
float get_clouds_density(void) const;
bool get_clouds_enable_state(void) const;
void set_clouds_CacheSize(int sizeKb);
void set_CacheResolution(int resolutionPixels);
void set_clouds_visibility(float distance);
void set_clouds_density(float density);
void set_clouds_enable_state(bool enable);
@@ -54,5 +68,4 @@ public:
extern SGEnviro sgEnviro;
#endif // _VISUAL_ENVIRO_HXX
#endif // _VISUAL_ENVIRO_HXX