chromatic aberation? depth of field?

Is it possible to simulate chromatic aberation?

how about depth of field?

Id like to simulate those and control them via script if possible?

Tj

Chromatic aberration: yes. I’d imagine that would be an image postprocessing effect that jitters RGB channels a bit (more distortion toward the edges of the screen, etc.)?

Depth of Field: yes. A simple implementation is in Shader Replacement project on our resources area.

aha!

thank you.

:wink:

Tj

quick question…

where might I start to figuring out how to do post-processing effect ( aberration ) ?

How do I get access to the entire image for pixel manipulation? Is that possible from camera image?

Tj

Take a look at how other image effects are implemented (import Pro Standard Assets into an empty project for a start). One of the simplest ones is Sepia filter, for example. That one just reads input pixel and outputs sepia-colored pixel. If you take a look at Vortex or Twirl effects, they do distort the image.

aha

thank you - I will look at those next!

cheers thanks for the quick advice.

:slight_smile:

Tj

Hi

i loaded up the shader samples and found the refractive and water demo…

I noticed it only works in the Pro app - and not in iPhone version…

is the iPhone not capable of doing refractive shading? Id like to create some ‘lenses’ that the camera must see thru - but if I cant do it in Unity on iPhone - I will have to fake it some other way.

?

Tj

Oh, the iPhone is like a graphics card from 1999s. It can’t do pixel shaders and all that stuff. So no, no refraction, chromatic aberration or depth of field there.

darn.

:frowning:

ok I will have to find a way to fake it.

Tj

The only option is a single gui texture or something similar basing on a single object. Doing it dynamically is CPU performance wise a big no go unless you wanted to have the effect only which I highly doubt.

Think of the iPhone as a P3 500Mhz with an NVIDIA TNT2 / GeForce 1 card and 96MB of RAM

Gives you an idea what to expect performance and possibility wise.