M MY Multiplayer: Wiki
Side
Kind

engineGetPostImage

Client

Gives the image a post process step produces, to draw it or use it in another material.

texture|false engineGetPostImage(material|string material, string step)

Parameters

NameTypeDescription
materialmaterial|stringThe material or a material's name.
stepstringThe step's name (step) in the shader.

Returns

A texture element with the step's image, the same one for the same material and step. false when the material's shader is not a post shader or has no such step; the warning lists the steps it has.

Example

local bloom = engineCreateMaterial(engineCreateShader("shaders/bloom.shader"))
engineAddPostProcess(bloom)
local bright = engineGetPostImage(bloom, "bright")

addEventHandler("onClientRender", root, function()
    if bright then
        dxDrawImage(20, 20, 320, 180, bright)
    end
end)
NoteA name that is not a material is an error.

See also