Commit 7c59ec3f authored by Felix Schröder's avatar Felix Schröder
Browse files

Remove RENDERLAYER_NONE

parent e56041a5
......@@ -18,12 +18,25 @@ constexpr const char* materialNames[] = {"No Texture",
"Hatch",
"Stippling"};
constexpr const char* layerNames[] = {
"RENDERLAYER_NONE ", "Normals ", "Trace Distance ", "Object ID ",
"Step Count ", "Min Distance ", "Gradient (x) ", "Gradient (y) ",
"Material Color ", "Ambient Lighting ", "Diffuse Lighting ", "GGX Shading ",
"Ambient Occlusion ", "Shadow Mapping ", "Soft Shadows ", "Skybox ",
"Skybox Reflections", "Silhouette ", "Tone Mapping ", "FXAA "};
constexpr const char* layerNames[] = {"Normals ",
"Trace Distance ",
"Object ID ",
"Step Count ",
"Min Distance ",
"Gradient (x) ",
"Gradient (y) ",
"Material Color ",
"Ambient Lighting ",
"Diffuse Lighting ",
"GGX Shading ",
"Ambient Occlusion ",
"Shadow Mapping ",
"Soft Shadows ",
"Skybox ",
"Skybox Reflections",
"Silhouette ",
"Tone Mapping ",
"FXAA "};
int materialID = 0;
......
......@@ -7,12 +7,11 @@ RenderLayer::RenderLayer(Shader::ShaderSource source)
{
}
RenderLayer::RenderLayer(Type type) : m_type(type)
RenderLayer::RenderLayer(Type type)
: m_type(type)
{
switch(type)
{
case RENDERLAYER_NONE:
break;
case NORMALS:
m_source = dino::ShaderFile::load("post_process/normals.glsl");
break;
......@@ -65,8 +64,8 @@ RenderLayer::RenderLayer(Type type) : m_type(type)
m_source = dino::ShaderFile::load("post_process/silhouette.glsl");
break;
case TONE_MAPPING:
m_source = dino::ShaderFile::load("post_process/tonemap.glsl");
break;
m_source = dino::ShaderFile::load("post_process/tonemap.glsl");
break;
case FXAA:
m_source = dino::ShaderFile::load("post_process/fxaa.glsl");
break;
......@@ -79,8 +78,7 @@ const Shader::ShaderSource& RenderLayer::getShaderSource() const { return m_sour
bool RenderLayer::isActive() const { return m_isActive; }
RenderLayer::Type RenderLayer::getType() const
{ return m_type; }
RenderLayer::Type RenderLayer::getType() const { return m_type; }
void RenderLayer::setActive(bool active) { m_isActive = active; }
......@@ -95,7 +93,7 @@ std::vector<std::shared_ptr<RenderLayer>> RenderLayer::createRenderPipeline(Grou
DIFFUSE_LIGHTING,
GGX_LIGHTING,
SKYBOX,
TONE_MAPPING,
TONE_MAPPING,
};
break;
case LIGHTING_REFLECTIONS:
......@@ -105,7 +103,7 @@ std::vector<std::shared_ptr<RenderLayer>> RenderLayer::createRenderPipeline(Grou
GGX_LIGHTING,
SKYBOX_REFLECTIONS,
SKYBOX,
TONE_MAPPING,
TONE_MAPPING,
};
break;
case LIGHTING_SHADOW:
......@@ -114,9 +112,9 @@ std::vector<std::shared_ptr<RenderLayer>> RenderLayer::createRenderPipeline(Grou
AMBIENT_LIGHTING,
DIFFUSE_LIGHTING,
GGX_LIGHTING,
AMBIENT_OCCLUSION,
AMBIENT_OCCLUSION,
SKYBOX,
TONE_MAPPING,
TONE_MAPPING,
};
break;
case LIGHTING_SHADOWMAPS:
......@@ -127,7 +125,7 @@ std::vector<std::shared_ptr<RenderLayer>> RenderLayer::createRenderPipeline(Grou
GGX_LIGHTING,
AMBIENT_OCCLUSION,
SKYBOX,
TONE_MAPPING,
TONE_MAPPING,
};
break;
case LIGHTING_FULL:
......@@ -136,10 +134,10 @@ std::vector<std::shared_ptr<RenderLayer>> RenderLayer::createRenderPipeline(Grou
AMBIENT_LIGHTING,
DIFFUSE_LIGHTING,
GGX_LIGHTING,
AMBIENT_OCCLUSION,
AMBIENT_OCCLUSION,
SKYBOX_REFLECTIONS,
SKYBOX,
TONE_MAPPING,
TONE_MAPPING,
};
break;
case DF_VISUALIZATION:
......@@ -163,10 +161,7 @@ std::vector<std::shared_ptr<RenderLayer>>
for(auto layer : layers)
{
if(layer != RENDERLAYER_NONE)
{
result.push_back(std::make_shared<RenderLayer>(layer));
}
result.push_back(std::make_shared<RenderLayer>(layer));
}
return result;
}
......
......@@ -15,7 +15,6 @@ class RenderLayer
public:
enum Type
{
RENDERLAYER_NONE,
NORMALS,
TRACE_T,
OBJECT_ID,
......@@ -96,6 +95,6 @@ public:
private:
Shader::ShaderSource m_source;
bool m_isActive = true;
Type m_type = RENDERLAYER_NONE;
Type m_type = NORMALS;
};
} // namespace dino
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment