This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

willywill

Chromatic Dispersion [Advanced]

36 posts in this topic

More accurate than chromatic aberration and more demanding as well. Different Color sets depending on your taste this time! As requested by DaBossTMR. 

Requires Unity Pro and a graphics card capable of Shader Model 3.0+

 

Screenshot:

 

Please login or register to see this link.

 

Shader:

Please login or register to see this spoiler. Edited by DaBossTMR
6 people like this

Share this post


Link to post
Share on other sites

It's ironic how short shaders are compared to scripts. They're so small, yet do so much.

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

Yupp. They control how every pixel is rendered on the screen. Its some really powerful stuff though, that allows one to become artistic with the way things are shaded on the screen and create some gorgeous looking graphics :) I see a lot of AAA games with horrible aesthetics. Sure they have all those advanced lighting features etc. But the colors are either so ugly or monotone it washes out all those great features.

Share this post


Link to post
Share on other sites

Nice work :) I like the option where you can change the chromatic colors.

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

It was more so your idea lol. No worries though I gave you credits :)

Share this post


Link to post
Share on other sites

Shader code gives error...

 

Please login or register to see this quote. Edited by Mauri

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

Thanks for the warning I forgot to mention dynamic branching is DX11 only. I can convert it but I need to finish some things first. Sorry guys working on a million shaders at once.

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

Try this..

Please login or register to see this code.

Share this post


Link to post
Share on other sites

Doesn't work either. I get 44 Errors now...
 

Please login or register to see this quote.

Just to name a few...
 

Could it be that your Please login or register to see this link. is also DX11-only?

Share this post


Link to post
Share on other sites

Unity doesn't like for loops inside of shaders. It always assumes SM4.0+ because when I try and compile to SM3.0 it says it uses to many instructions because of Unity adding extra things for absolutely no reason

Share this post


Link to post
Share on other sites
Please login or register to see this quote. Sorry to be offtopic, but have you uploaded the shaders?

:)

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

 Try the first shader i've posted at the top and screenshot any errors please. I didn't think the second one would work

Share this post


Link to post
Share on other sites

Ive used the shader in the first post

and it looks like this:

shaderbug.png

and btw: 

My graphics card supports shader model 4.1

Share this post


Link to post
Share on other sites

Click on the shader and screenshot the errors inside the inspector view please like this:

Please login or register to see this link.

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

Use this shader and close then reopen unity and then post any errors from there please

Please login or register to see this code. Edited by willywill

Share this post


Link to post
Share on other sites

I have a fix. Its saying Unity is trying to unroll those loops but it can't because of the tex2D I put inside the loop. One second I'll update the shader

Share this post


Link to post
Share on other sites

Ok try this please 

Please login or register to see this code.
2 people like this

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

You're welcome :)

Edited by willywill

Share this post


Link to post
Share on other sites

Umm, next problem: In standalone, the camera wont do anything! Its all black and my gui is bugging around and all :(

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

I have the same problem whenever I use custom shaders. I dont know what it is exactly but I'm still searching for a solution.

 

I'm 100% sure its something related to this:

Please login or register to see this link.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now