Jump to content

Recommended Posts

I used the function in this way:

local texpath = "images/noise_texture.tex"
table.insert(Assets,Asset("IMAGE"texpath))
AddModShadersInit(function()
/...code.../
    local PostProcessor = GLOBAL.PostProcessor
    TexSamplers.noise_tex=PostProcessor:AddTextureSampler(texpath)--when this code is annotated the game can start properly
/....code..../
end)

then the game crashed when i load a save

and the log says 

"Assert failure 'mTex != INVALID_RESOURCE_HANDLE' at ..\source\game\render\PostProcessor.cpp(459): Trace follows..."

What's the proper form for  the parameter accepted by the function postprocessor:AddTextureSampler() or is there something else wrong?

remarks:

I have tried something like "resolvefilepath" or "softresolvefilepath" or just using the absolute path but none of them works.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...