Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2006, 2:59:44 AM (18 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine: random animated and generated clouds, veerrryyyy slow hmm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h

    r7782 r7784  
    3030                virtual void tick(float dt);
    3131
     32                inline void setCloudAnimation(float timestep) { this->cloudAnimTimeStep = timestep; }
     33
    3234        private:
    33                 // Basic noise map 32x32
    34                 float map32[32 * 32];
     35                // Basic noise maps 32x32
     36                float                                                                                                           cloudMap32_a[32 * 32];
     37                float                                                                                                           cloudMap32_b[32 * 32];
     38                float                                                                                                           cloudMap32_c[32 * 32];
    3539
    36                 // The cloud map
    37                 float map256[256 * 256];
     40                // The cloud map 256x256
     41                float                                                                                                           cloudMap256[256 * 256];
    3842
    39                 char texture[256][256][3];       //Temporary array to hold texture RGB values
     43                // Temporary array to hold texture RGB values
     44                char                                                                                                                    cloudTexture[256][256][3];
    4045
    41                 float noise(int x, int y, int random);
    42                 void setNoise(float  *map);
    43                 float interpolate(float x, float y, float  *map);
    44                 void overlapOctaves(float  *map32, float  *map256);
    45                 void expFilter(float  *map);
    46                 GLuint texID[1];
     46                GLuint                                                                                                          texID[2];
     47                float                                                                                                           timer;
     48
     49                bool                                                                                                                    cloudAnimTimeStep;
     50
     51                float                                                                                                           noise(int x, int y, int random);
     52                float                                                                                                           interpolate(float x, float y, float  *map);
     53                void                                                                                                            overlapOctaves();
     54                void                                                                                                            expFilter();
     55
     56                void                                                                                                            genNoiseMap(float  *map);
     57                void                                                                                                            genCloudTexture();
     58                void                                                                                                            calcAnimMap(float timer);
    4759
    4860};
Note: See TracChangeset for help on using the changeset viewer.