DudeAwesome Posted March 5, 2014 Posted March 5, 2014 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. 1 Quote It doesn´t work... why? mhmmm It works... why?
gamecreator Posted March 5, 2014 Posted March 5, 2014 And not just on or off. Allow setting of strength/amount of each effect. Quote
shadmar Posted March 5, 2014 Posted March 5, 2014 camera:AddPosteffect("/path/to/effect.shader") --Add camera:CameraClearPostEffects() --removal. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB
KTyJLXy Posted March 5, 2014 Posted March 5, 2014 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? Quote
DudeAwesome Posted March 5, 2014 Author Posted March 5, 2014 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 Quote It doesn´t work... why? mhmmm It works... why?
Recommended Posts
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.