Applying Shaders to Sprites, Shaders beneath sprites

153 views
Skip to first unread message

Smiz4eal

unread,
Sep 14, 2015, 11:10:12 AM9/14/15
to haxef...@googlegroups.com
Does anyone know if there's a way in haxeflixel or openfl to apply a shader to just one sprite? Additionally, is there any way to get a PostProcess to affect only one camera, and not the UI/HUD camera for instance (looking at previous discussions here makes me think this is not possible, yet).

Poking around the code for PostProcess seems to indicate that adding a PostProcess assumes that it is going to apply globally to the whole screen. Now I'm somewhat new to shaders in general, and I do realize you can just modify the shader code itself to limit where it is displayed, but that said it seems a great feature would be the ability to apply shader directly to a sprite. It would be especially useful if you could then have other sprites layered over the shader-affected one. If this feature exists already, I'd greatly appreciate if anyone could point me to it.

Thanks!

SruloArt

unread,
Sep 15, 2015, 3:07:27 PM9/15/15
to HaxeFlixel
* Currently, not possible, maybe in the near/far future (based on some expected code merges into OpenFL AFAIK). The benefits are well known :)
* Flash Sprites != HaxeFlixel FlxSprites. The entire game is one big Flash's Sprite.
Reply all
Reply to author
Forward
0 new messages