FMaterialBakingHelpers::PerformShrinking

Shrinks the array to a single pixel if the entire output is monochrome.

Unreal Engine C++ API Reference > Developer > MaterialBaking > FMaterialBakingHelpers

References

   
Module MaterialBaking
Header /Engine/Source/Developer/MaterialBaking/Public/MaterialBakingHelpers.h
Include #include "MaterialBakingHelpers.h"
Source /Engine/Source/Developer/MaterialBaking/Private/MaterialBakingHelpers.cpp
static void PerformShrinking
(
    [TArray](API\Runtime\Core\Containers\TArray)< [FColor](API\Runtime\Core\Math\FColor) > & InOutPixels,
    int32 & OnOutImageWidth,
    int32 & InOutImageHeight,
    [FColor](API\Runtime\Core\Math\FColor) BackgroundColor
)

Remarks

Shrinks the array to a single pixel if the entire output is monochrome. Params will be adjusted accordingly when this occurs. It's useful to perform this before the border smear as a single non-magenta pixel value would have led to a monochrome image post-smear anyway, so the actual smearing process can be skipped.

Parameters

Name Description
InOutPixels The image to shrink
ImageWidth The width of the image in pixels
ImageHeight The height of the image in pixels

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library