Skip to content
Snippets Groups Projects
Commit 0b10544b authored by Yoel's avatar Yoel
Browse files

Refactor SingleLightGroup: Return texels too

parent 5306d480
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,10 @@ LightSingleGroup::LightSingleGroup(const util::Mat4& matrix, ...@@ -15,9 +15,10 @@ LightSingleGroup::LightSingleGroup(const util::Mat4& matrix,
util::SurfacePoint LightSingleGroup::sampleLight() const { util::SurfacePoint LightSingleGroup::sampleLight() const {
auto sample = light->sampleLight(); auto sample = light->sampleLight();
auto result = util::SurfacePoint( auto result =
transform.toWorld.transformPoint(sample.point()), util::SurfacePoint(transform.toWorld.transformPoint(sample.point()),
transform.toWorldN.transformDir(sample.normal()), sample.material); transform.toWorldN.transformDir(sample.normal()),
sample.texel(), sample.material);
return result; return result;
} }
util::Vec3 LightSingleGroup::calculateLightEmission(const util::SurfacePoint& p, util::Vec3 LightSingleGroup::calculateLightEmission(const util::SurfacePoint& p,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment