<commit_before>
#include "LightTestPipeline.h"

#include <glbinding/gl/enum.h>

#include <globjects/NamedString.h>
#include <globjects/base/File.h>

#include <gloperate/gloperate.h>
#include <gloperate/rendering/ColorRenderTarget.h>
#include <gloperate/rendering/ShapeType.h>
#include <gloperate/rendering/Camera.h>
#include <gloperate/stages/base/TextureRenderTargetStage.h>
#include <gloperate/stages/base/TimerStage.h>
#include <gloperate/stages/base/ClearStage.h>
#include <gloperate/stages/base/ShapeStage.h>
#include <gloperate/stages/base/TransformStage.h>
#include <gloperate/stages/base/ProgramStage.h>
#include <gloperate/stages/base/RenderPassStage.h>
#include <gloperate/stages/base/RasterizationStage.h>
#include <gloperate/stages/lights/LightCreationStage.h>
#include <gloperate/stages/lights/LightBufferTextureStage.h>


CPPEXPOSE_COMPONENT(LightTestPipeline, gloperate::Stage)


LightTestPipeline::LightTestPipeline(gloperate::Environment * environment, const std::string & name)
: Pipeline(environment, "LightTestPipeline", name)
, canvasInterface(this)
, glossiness("glossiness", this)
, lightType1("lightType1", this, 0)
, lightType2("lightType2", this, 1)
, lightType3("lightType3", this, 4)
, lightColor1("lightColor1", this, glm::vec3(0.5, 0, 0))
, lightColor2("lightColor2", this, glm::vec3(0.125, 0.125, 0.125))
, lightColor3("lightColor3", this, glm::vec3(1, 1, 1))
, lightPos1("lightPos1", this, glm::vec3(-2, 0, 2))
, lightPos2("lightPos2", this, glm::vec3(0, 0, 0))
, lightPos3("lightPos3", this, glm::vec3(1.5, 1.3, 1.5))
, lightAttenuation1("lightAttenuation1", this, glm::vec3(1, 0.2f, 0.01f))
, lightAttenuation2("lightAttenuation2", this, glm::vec3(1, 0.2f, 0.01f))
, lightAttenuation3("lightAttenuation3", this, glm::vec3(1, 0.2f, 0.01f))
, m_lightDefStage1(cppassist::make_unique<gloperate::LightCreationStage>(environment))
, m_lightDefStage2(cppassist::make_unique<gloperate::LightCreationStage>(environment))
, m_lightDefStage3(cppassist::make_unique<gloperate::LightCreationStage>(environment))
, m_lightAccumulationStage(cppassist::make_unique<gloperate::LightBufferTextureStage>(environment))
, m_depthBufferStage(cppassist::make_unique<gloperate::TextureRenderTargetStage>(environment))
, m_clearStage(cppassist::make_unique<gloperate::ClearStage>(environment))
, m_shapeStage(cppassist::make_unique<gloperate::ShapeStage>(environment))
, m_transformStage(cppassist::make_unique<gloperate::TransformStage>(environment))
, m_timerStage(cppassist::make_unique<gloperate::TimerStage>(environment))
, m_programStage(cppassist::make_unique<gloperate::ProgramStage>(environment))
, m_renderPassStage(cppassist::make_unique<gloperate::RenderPassStage>(environment))
, m_rasterizationStage(cppassist::make_unique<gloperate::RasterizationStage>(environment))
, m_camera(cppassist::make_unique<gloperate::Camera>(glm::vec3(0.0f, 2.0f, 3.0f)))
{
    const auto dataPath = gloperate::dataPath();

    addStage(m_lightDefStage1.get());
    m_lightDefStage1->color << lightColor1;
    m_lightDefStage1->position << lightPos1;
    m_lightDefStage1->type << lightType1;
    m_lightDefStage1->attenuationCoefficients << lightAttenuation1;
    addStage(m_lightDefStage2.get());
    m_lightDefStage2->color << lightColor2;
    m_lightDefStage2->position << lightPos2;
    m_lightDefStage2->type << lightType2;
    m_lightDefStage2->attenuationCoefficients << lightAttenuation2;
    addStage(m_lightDefStage3.get());
    m_lightDefStage3->color << lightColor3;<commit_msg>Adapt light positions to smaller cube<commit_after>
#include "LightTestPipeline.h"

#include <glbinding/gl/enum.h>

#include <globjects/NamedString.h>
#include <globjects/base/File.h>

#include <gloperate/gloperate.h>
#include <gloperate/rendering/ColorRenderTarget.h>
#include <gloperate/rendering/ShapeType.h>
#include <gloperate/rendering/Camera.h>
#include <gloperate/stages/base/TextureRenderTargetStage.h>
#include <gloperate/stages/base/TimerStage.h>
#include <gloperate/stages/base/ClearStage.h>
#include <gloperate/stages/base/ShapeStage.h>
#include <gloperate/stages/base/TransformStage.h>
#include <gloperate/stages/base/ProgramStage.h>
#include <gloperate/stages/base/RenderPassStage.h>
#include <gloperate/stages/base/RasterizationStage.h>
#include <gloperate/stages/lights/LightCreationStage.h>
#include <gloperate/stages/lights/LightBufferTextureStage.h>


CPPEXPOSE_COMPONENT(LightTestPipeline, gloperate::Stage)


LightTestPipeline::LightTestPipeline(gloperate::Environment * environment, const std::string & name)
: Pipeline(environment, "LightTestPipeline", name)
, canvasInterface(this)
, glossiness("glossiness", this)
, lightType1("lightType1", this, 0)
, lightType2("lightType2", this, 1)
, lightType3("lightType3", this, 4)
, lightColor1("lightColor1", this, glm::vec3(0.5, 0, 0))
, lightColor2("lightColor2", this, glm::vec3(0.125, 0.125, 0.125))
, lightColor3("lightColor3", this, glm::vec3(1, 1, 1))
, lightPos1("lightPos1", this, glm::vec3(-1, 0, 2))
, lightPos2("lightPos2", this, glm::vec3(0, 0.6, 0))
, lightPos3("lightPos3", this, glm::vec3(1.0, 0.8, 1.0))
, lightAttenuation1("lightAttenuation1", this, glm::vec3(1, 0.2f, 0.01f))
, lightAttenuation2("lightAttenuation2", this, glm::vec3(1, 0.2f, 0.01f))
, lightAttenuation3("lightAttenuation3", this, glm::vec3(1, 0.2f, 0.01f))
, m_lightDefStage1(cppassist::make_unique<gloperate::LightCreationStage>(environment))
, m_lightDefStage2(cppassist::make_unique<gloperate::LightCreationStage>(environment))
, m_lightDefStage3(cppassist::make_unique<gloperate::LightCreationStage>(environment))
, m_lightAccumulationStage(cppassist::make_unique<gloperate::LightBufferTextureStage>(environment))
, m_depthBufferStage(cppassist::make_unique<gloperate::TextureRenderTargetStage>(environment))
, m_clearStage(cppassist::make_unique<gloperate::ClearStage>(environment))
, m_shapeStage(cppassist::make_unique<gloperate::ShapeStage>(environment))
, m_transformStage(cppassist::make_unique<gloperate::TransformStage>(environment))
, m_timerStage(cppassist::make_unique<gloperate::TimerStage>(environment))
, m_programStage(cppassist::make_unique<gloperate::ProgramStage>(environment))
, m_renderPassStage(cppassist::make_unique<gloperate::RenderPassStage>(environment))
, m_rasterizationStage(cppassist::make_unique<gloperate::RasterizationStage>(environment))
, m_camera(cppassist::make_unique<gloperate::Camera>(glm::vec3(0.0f, 2.0f, 3.0f)))
{
    const auto dataPath = gloperate::dataPath();

    addStage(m_lightDefStage1.get());
    m_lightDefStage1->color << lightColor1;
    m_lightDefStage1->position << lightPos1;
    m_lightDefStage1->type << lightType1;
    m_lightDefStage1->attenuationCoefficients << lightAttenuation1;
    addStage(m_lightDefStage2.get());
    m_lightDefStage2->color << lightColor2;
    m_lightDefStage2->position << lightPos2;
    m_lightDefStage2->type << lightType2;
    m_lightDefStage2->attenuationCoefficients << lightAttenuation2;
    addStage(m_lightDefStage3.get());
    m_lightDefStage3->color << lightColor3;
{'fraction_non_alphanumeric': 0.14927288280581694, 'fraction_numerical': 0.033219275734245796, 'mean_word_length': 9.423476968796434, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3519348', 'n_tokens_mistral': 2582, 'n_tokens_neox': 2499, 'n_words': 292}