Inheritence

Summary

Load images from disk and convert them to textures

Constructors

ImageFileGenerator

Properties

Blur The intensity of the blur effect. If 0, no blur is applied.
Brightness The brightness of the image.
CacheToDisk
Colorize When enabled, every pixel in the image will be re-colored to the Sandbox.Resources.ImageFileGenerator.TargetColor (interpolated by the alpha).
Contrast The contrast of the image.
ConvertHeightToNormals When enabled, the output texture will be a normal map generated from the heightmap of the image.
Cropping How many pixels from each edge to crop from the image. If negative values are used, the image will be expanded instead of cropped.
FilePath The path to the image file, relative to any other assets in the project.
FlipHorizontal Whether or not to flip the image horizontally. This is done after everything else has been applied.
FlipVertical Whether or not to flip the image vertically. This is done after everything else has been applied.
Hue How much to adjust the hue of the image, in degrees. If 0, no hue adjustment is applied.
InvertColor Whether or not to invert the colors of the image.
MaxSize The maximum size of the image in pixels. If the imported image is larger than this (after cropping), it will be downscaled to fit.
NormalScale The scale of the normal map when using Sandbox.Resources.ImageFileGenerator.ConvertHeightToNormals. If negative, the normal map will be inverted.
Padding How many pixels of padding from each edge. After the image has been cropped, padding is added without affecting the size of the image (scaling the original image down to fit padded margins).
Rotate How much to rotate the image by, in degrees. This is applied after cropping and padding.
Saturation The saturation of the image.
Sharpen The intensity of the sharpen effect. If 0, no sharpening is applied.
TargetColor When Sandbox.Resources.ImageFileGenerator.Colorize is enabled, this is the target color that every pixel in the image will be re-colored to.
Tint The color the image should be tinted. This effectively multiplies the color of each pixel by this color (including alpha).

Methods

CreateEmbeddedResource
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.