Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 26, 2006, 3:18:08 PM (19 years ago)
Author:
patrick
Message:

merged water branche back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/environments/mapped_water.h

    r8719 r8792  
    1212  <waterangle>0</waterangle>
    1313  <normalmapscale>0.25</normalmapscale><!-- you won't see a big differnce if you change that -->
     14  <shininess>128</shininess><!-- the bigger the value, the smaller the specular reflection point -->
     15  <watercolor>0.1, 0.2, 0.4</watercolor>
    1416</MappedWater>
    1517*/
     
    4951  void setWaterFlow(float flow) { this->waterFlow = flow; };
    5052  void setNormalMapScale(float scale) { this->kNormalMapScale = scale; };
     53  void setShininess(float shine) { this->shininess = shine; };
     54  void setWaterColor(float r, float g, float b) { this->waterColor = Vector(r,g,b); };
     55
     56  // functions to change water parameters during runtime
     57  // to reset waterUV and waterFlow just use the normal set functions
     58  void resetWaterColor(float r, float g, float b);
     59  void resetShininess(float shine);
     60  void resetLightPos(float x, float y, float z);
     61
     62  // fade functions
     63  void fadeWaterColor(float r, float g, float b, float time);
     64  void fadeShininess(float shine, float time);
     65  void fadeLightPos(float x, float y, float z, float time);
    5166
    5267private:
     
    6075  Vector              lightPos;               //!< position of the light that is used to render the reflection
    6176  float               waterAngle;             //!< defines how much the water will be turned around the point waterPos
    62 
     77  Vector              waterColor;             //!< color of the water
    6378  float               move;                   //!< textures coords, speeds, positions for the shaded textures....
    6479  float               move2;
     
    6782  float               normalUV;
    6883  float               kNormalMapScale;
     84  float               shininess;              //!< the bigger the value, the smaller the specular reflection point
    6985
    7086  int                 textureSize;            //!< height and width of the texture
     
    7288  Shader*             shader;
    7389  Shader::Uniform*    cam_uni;                //!< uniform that is used for the camera position
     90  Shader::Uniform*    light_uni;              //!< uniform that is used for the light position
     91  Shader::Uniform*    color_uni;              //!< uniform that is used for the watercolor
     92  Shader::Uniform*    shine_uni;              //!< uniform that is used for the specular shininessd of the water
     93 
     94 
     95  int tempcounter;
    7496};
    7597
Note: See TracChangeset for help on using the changeset viewer.