GBear Posted December 30, 2015 Share Posted December 30, 2015 hi.. I set Grayfilter to draw gray screen into container of top; it looks good. but it gave me frame drop.. so I checked and finded size of container is 7168x7168. but I hope to draw screen area like 1280*720 or 1920*1080 is there idea? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 30, 2015 Share Posted December 30, 2015 Ok, suppose you have a sceneContainer with size 7168x7168 and some position. Lets create outerContainer:outerContainer.addChild(sceneContainer);outerContainer.filters = [new GrayScaleFilter()]; //whatever, i dont remember the class nameouterContainer.filterArea = new Rectangle(0, 0, renderer.width, renderer.height);renderer.render(outerContainer);Dont forget that you have to re-create that Rectangle on every resize. Also, I suggest you to crop objects that arent seen in viewport (make obj.renderable=false for them) every frame. Quote Link to comment Share on other sites More sharing options...
GBear Posted December 30, 2015 Author Share Posted December 30, 2015 oh.. really thx a lot... filterArea is good and frame is up when i set it. but I got other problem i set filterArea with Rectange(640, 720) (default 1280, 720) I hoped right side will be drawn original screenbut there is drawn white screenthis image is right is white. thx.. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 30, 2015 Share Posted December 30, 2015 Copy grayscale filter and modify its shader that way it wont edit the colors or right part. filterArea must be 1280,720. I can help you with that Quote Link to comment Share on other sites More sharing options...
GBear Posted December 31, 2015 Author Share Posted December 31, 2015 i see ..Copy grayscale filter and modify its shader that way it wont edit the colors or right part. filterArea must be 1280,720. I can help you with that this means I have to modify GrayFilter to draw right part that color is normal? like filterArea = 1280, 720 filters = [modified GrayFilter]is it right? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 31, 2015 Share Posted December 31, 2015 yes Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 31, 2015 Share Posted December 31, 2015 There are no filters that apply partially, you have to do it yourself, and it needs to be part of shader. Quote Link to comment Share on other sites More sharing options...
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.