diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/nr-filter-diffuselighting.cpp | 4 | ||||
| -rw-r--r-- | src/display/nr-filter-specularlighting.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/display/nr-filter-diffuselighting.cpp b/src/display/nr-filter-diffuselighting.cpp index d48b6d690..fa925ceae 100644 --- a/src/display/nr-filter-diffuselighting.cpp +++ b/src/display/nr-filter-diffuselighting.cpp @@ -94,7 +94,7 @@ struct DiffusePointLight : public DiffuseLight { guint32 operator()(int x, int y) { NR::Fvector light; - _light.light_vector(light, _x0 + x, _y0 + y, alphaAt(x, y)/255.0); + _light.light_vector(light, _x0 + x, _y0 + y, _scale * alphaAt(x, y)/255.0); return diffuseLighting(x, y, light, _light_components); } private: @@ -114,7 +114,7 @@ struct DiffuseSpotLight : public DiffuseLight { guint32 operator()(int x, int y) { NR::Fvector light, light_components; - _light.light_vector(light, _x0 + x, _y0 + y, alphaAt(x, y)/255.0); + _light.light_vector(light, _x0 + x, _y0 + y, _scale * alphaAt(x, y)/255.0); _light.light_components(light_components, light); return diffuseLighting(x, y, light, light_components); } diff --git a/src/display/nr-filter-specularlighting.cpp b/src/display/nr-filter-specularlighting.cpp index 758b28979..8ea99562e 100644 --- a/src/display/nr-filter-specularlighting.cpp +++ b/src/display/nr-filter-specularlighting.cpp @@ -103,7 +103,7 @@ struct SpecularPointLight : public SpecularLight { guint32 operator()(int x, int y) { NR::Fvector light, halfway; - _light.light_vector(light, _x0 + x, _y0 + y, alphaAt(x, y)/255.0); + _light.light_vector(light, _x0 + x, _y0 + y, _scale * alphaAt(x, y)/255.0); NR::normalized_sum(halfway, light, NR::EYE_VECTOR); return specularLighting(x, y, halfway, _light_components); } @@ -125,7 +125,7 @@ struct SpecularSpotLight : public SpecularLight { guint32 operator()(int x, int y) { NR::Fvector light, halfway, light_components; - _light.light_vector(light, _x0 + x, _y0 + y, alphaAt(x, y)/255.0); + _light.light_vector(light, _x0 + x, _y0 + y, _scale * alphaAt(x, y)/255.0); _light.light_components(light_components, light); NR::normalized_sum(halfway, light, NR::EYE_VECTOR); return specularLighting(x, y, halfway, light_components); |
