mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-02-17 09:55:38 +00:00
![Ian Curtis](/assets/img/avatar_default.png)
Rewrite the scroll fog shader slightly. Scroll fog is a 2d layer, it has no depth, or can be considered to be drawn at infinity, therefore is not effected by the viewport light. The scroll attenatuion value also I think attenatutes the scroll fog alpha value. This fixes various effects in emergency call ambulance.
38 lines
606 B
C++
38 lines
606 B
C++
#ifndef _R3DSCROLLFOG_H_
|
|
#define _R3DSCROLLFOG_H_
|
|
|
|
#include "Util/NewConfig.h"
|
|
#include <GL/glew.h>
|
|
|
|
namespace New3D {
|
|
|
|
class R3DScrollFog
|
|
{
|
|
public:
|
|
|
|
R3DScrollFog(const Util::Config::Node &config);
|
|
~R3DScrollFog();
|
|
|
|
void DrawScrollFog(float rbga[4], float attenuation, float ambient);
|
|
|
|
private:
|
|
|
|
void AllocResources();
|
|
void DeallocResources();
|
|
|
|
const Util::Config::Node &m_config;
|
|
|
|
GLuint m_shaderProgram;
|
|
GLuint m_vertexShader;
|
|
GLuint m_fragmentShader;
|
|
|
|
GLint m_locFogColour;
|
|
GLint m_locFogAttenuation;
|
|
GLint m_locFogAmbient;
|
|
|
|
GLuint m_vao;
|
|
};
|
|
|
|
}
|
|
|
|
#endif |