some stuff to render flow, i really need to disambiguise the camera viewport to the size of render textures
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
#include "ray_source.hpp"
|
||||
|
||||
#include <scene/camera.hpp>
|
||||
|
||||
#include <tracing/ray.hpp>
|
||||
|
||||
using namespace inferno;
|
||||
|
||||
RaySource::RaySource()
|
||||
RaySource::RaySource(Camera* camera)
|
||||
: mReferenceCamera(camera)
|
||||
{
|
||||
|
||||
this->generate();
|
||||
}
|
||||
|
||||
RaySource::~RaySource()
|
||||
@@ -12,12 +17,6 @@ RaySource::~RaySource()
|
||||
|
||||
}
|
||||
|
||||
void RaySource::cameraUpdate(Camera* camera)
|
||||
{
|
||||
mReferenceCamera = camera;
|
||||
|
||||
}
|
||||
|
||||
void RaySource::generate()
|
||||
{
|
||||
|
||||
@@ -25,5 +24,13 @@ void RaySource::generate()
|
||||
|
||||
RayField RaySource::getInitialRays(bool MSAA)
|
||||
{
|
||||
if (mReferenceCamera->didUpdate())
|
||||
{
|
||||
this->generate();
|
||||
}
|
||||
|
||||
for (int x = 0; x < mReferenceCamera->getRayViewport().x; x++)
|
||||
for (int y = 0; y < mReferenceCamera->getRayViewport().y; y++)
|
||||
|
||||
return RayField{};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user