-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathClouds.h
More file actions
70 lines (53 loc) · 1.57 KB
/
Clouds.h
File metadata and controls
70 lines (53 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* SimShip by Edouard Halbert
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License
http://creativecommons.org/licenses/by-nc-nd/4.0/ */
#pragma once
// Adapted from Federico Vaccaro
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <algorithm>
#include "Shader.h"
#include "Camera.h"
#include "texture.h"
#include "Sky.h"
using namespace std;
using namespace glm;
class Clouds
{
public:
Clouds(int width, int height, float windSpeedKN);
~Clouds();
void InitVariables();
void SetCloudSpeed(float windSpeedKN);
void GenerateModelTextures();
void GenerateWeatherMap();
void Render(Camera& camera, Sky* sky, vec2 wind);
GLuint GetTexture() { return tex; }
float Coverage = 0.0f;
float CloudSpeed = 0.0f;
float Crispiness = 0.0f;
float Curliness = 0.0f;
float Density = 0.0f;
float Illumination = 1.8f;
float Absorption = 0.0f;
float SphereInnerRadius = 0.0f;
float SphereOuterRadius = 0.0f;
float PerlinFrequency = 0.0f;
bool bEnableGodRays = true;
bool bPostProcess = true;
vec3 CloudColorTop = vec3(0.0f);
vec3 CloudColorBottom = vec3(0.0f);
vec3 Seed = vec3(0.0f);
private:
unique_ptr<Shader> mVolumetricCloudsShader;
unique_ptr<Shader> mWeatherShader;
unique_ptr<Shader> mPostProcessingShader;
unique_ptr<ScreenQuad> mPostProcessingScreenQuad;
GLuint * TexClouds;
GLuint mCloudsPostProcessingFBO = 0;
GLuint tex = 0;
GLuint depthTex = 0;
GLuint mTexPerlin = 0;
GLuint mTexWorley32 = 0;
GLuint mTexWeather = 0;
};