Jump to content

How to enable post processing Effects for camera


DudeAwesome
 Share

Recommended Posts

with code?

 

In editor just use the checkbox to Use Post Effects but how I can do this in code? I cant see this in the api.

 

like:

 

camera:EnablePostEffects(true)

 

everything that is possible in the editor should be possible from code side.

  • Upvote 1

It doesn´t work... why? mhmmm It works... why?

Link to comment
Share on other sites

I've tried to use that like

self.camera = Camera:Create()
self.camera:EnablePostEffects(true)
self.camera:AddPosteffect("Shaders/PostEffects/toon.shader")

 

and i keep having this error: "attempt to call method 'EnablePostEffects' (a nil value)"

any tips?

Link to comment
Share on other sites

I had the same error here and will quote Rick here

 

@OP Anytime you see an error that says that (replace that function name with whatever function you are trying to call) it means the function doesn't exist in Lua, meaning it's not exposed to Lua. That's either an error on Josh's part for not exposing it, or the documentation error for saying the function exists.

 

in other words the function is not official supported (its also not in the documentation) I guess.

 

 

btw

 

my function

 

self.camera:EnablePostEffects(true)

 

 

was just an example that I would like to see something like this.

 

see shadmars solution but this is not well documented also :(

It doesn´t work... why? mhmmm It works... why?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...