-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shaders on drawTiles (or individual DisplayObjects) #4
Comments
As far as i know move to shaders (GLSL, you mean?) will, first of all, make the openfl flash target broken, because flash should use the different shader approach (AGAL?) via stage3d. So, yes, it involves the global changes in OpenFL. BTW i've seen bunch of projects which were working on it, for instance https://github.com/wighawag/openfl-stage3d. |
I'm fine with this not working on Flash. This would be primarily targeted towards standalone games and mobile to a lesser extent. |
As far as I can tell it will require modifications to Lime. See my last response in this topic. http://forum.haxepunk.com/index.php?topic=656.msg2589#msg2589 |
Actually there are plans for user-programmable shaders in Lime roadmap - https://github.com/openfl/lime/wiki/Roadmap. So, i guess its a matter of time to get our hands dirty with GLSL stuff :) |
@MattTuttle - Thanks for linking to that post. From what I understand, the issue is that with HaxePunk, you're rendering everything to a single surface, so there's no way today to inject OpenGL calls in between because everything's rendered all in one go. You'd need to "flush" (instruct the game to immediately draw) the batched graphics calls to be able to then capture the image data and apply shaders to them. That makes sense. Suppose that what I'm doing is based on the DisplayList, using individual Sprites (one per "actor"), but I'm still drawing those Sprites using drawTiles. Does that still require a similar approach? I guess what I really want to know is whether I can somehow "capture" a Sprite's image data in render(), so I can apply a shader to it individually. |
In a rough sense, what would be involved in supporting shaders on drawTiles()?
Would it require a totally different approach (modifying OpenFL/Lime) or could it somehow be worked into this hands-off approach?
The text was updated successfully, but these errors were encountered: