HaxePunk / post-process

[Deprecated] Post processing using GLSL in HaxePunk
MIT License
13 stars 3 forks source link

Question - Drawing stuff after shaders are applied? #2

Closed jon914 closed 10 years ago

jon914 commented 10 years ago

Is there a way to "draw" stuff after the post-processing phase is over?

For example, if my game has an HUD layer (for a health bar, score, etc.), I'd like the shaders to do their work but not apply to those elements.

From what I understand, it's not as simple as adding something to the display tree after the PostProcess view - that would pick up what's drawn in the next frame, I imagine.

MattTuttle commented 10 years ago

You could add a Sprite after the PostProcess layer and draw to that. Unfortunately there isn't a nice way to render with HaxePunk on another Sprite.

jon914 commented 10 years ago

Thanks, adding a Sprite after the PostProcess layer did the trick.