-
Notifications
You must be signed in to change notification settings - Fork 96
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
Apply shaders on composite objects #94
Conversation
emaxe
commented
Apr 18, 2016
- added the ShaderComponent support;
- added the ShaderComponent support;
This part is a bit harder. You see we already have this kind of code for Images only (if you look at TextureRegionDrawLogic it has this shader condition there) so if you put shader on image with this code, you will get shader applied twice. I think your solution is good, if you also remove the shader part from the place I mentioned. Also make sure to pass as uniform some variables like time, delta time for shader animtions. Does this make sense? |
Well, yes , I tested only with composite objects. I need to get the items from the library , and then add to the engine. Then apply a shader . In the library I can put only a composite object, so my solution I like more .. |
yes, so because your code works for any item (including images) the shader code for images should be removed to not interfere with this one. Would be nice if you can do this for further testing. |
- remove shader apply from TextureRegionComponent
- remove shader from TextureRegionComponent
You know , my first solution works well with all objects and do not have a collision. In Overlap2dRenderer in drawRecursively function we do not have an simple image, only composite objects. |
- reverse
hmm. oh I see what you mean. let me check that. it should be correct then. |
Yes, i test it with composite objects and simple images. |
Tested and confirmed, thanks! Merging now. |