0

I want to create a vignette effect in cocos2d. I'm not really sure how I could go about doing this. I thought about just using an image, but a high resolution, fullscreen image (this is for iPad) would take up a lot of memory. Next, I thought about using CCRenderTexture. I've never used it before, but I'm currently looking into it. What advice do you have toward accomplishing this?

I want something similar to this (notice the black near the corners and edges of the image)

enter image description here

Thanks.

tallen11
  • 1,387
  • 2
  • 17
  • 33

1 Answers1

0

You could find or write a pixel shader to do it, but I've no experience to advise you there. Googling vignetting pixel shader yields a few samples that may give you a starting point.

Alternately, the image required to do a vignette effect for 2048 x 1536 would not take up so much memory that I would dismiss it out of hand. Give it a shot.

MechEthan
  • 5,703
  • 1
  • 35
  • 30