forked from bartvdbraak/blender
Fix T41921: MapUV node alpha setting broken.
The UV values includes the image width/height now. To restore the previous method as close as possible (even though it is not documented anywhere how this is supposed to work), we have to ignore this scaling.
This commit is contained in:
parent
ed4075cb34
commit
82c90a44c2
@ -62,7 +62,7 @@ void MapUVOperation::executePixelSampled(float output[4], float x, float y, Pixe
|
|||||||
*/
|
*/
|
||||||
float du = len_v2(deriv[0]);
|
float du = len_v2(deriv[0]);
|
||||||
float dv = len_v2(deriv[1]);
|
float dv = len_v2(deriv[1]);
|
||||||
float factor = 1.0f - threshold * (du + dv);
|
float factor = 1.0f - threshold * (du / m_inputColorProgram->getWidth() + dv / m_inputColorProgram->getHeight());
|
||||||
if (factor < 0.f) alpha = 0.f;
|
if (factor < 0.f) alpha = 0.f;
|
||||||
else alpha *= factor;
|
else alpha *= factor;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user