New Dirty Lens shader material

Hey folks!

I just posted my first item to the Unity Asset Store - Dirty Lens Effect. It’s a really nice effect, inspired by what we’ve seen in recent AAA games.

The usage is quite easy. It’s a simple, lightweight material that can be applied to anything in your scene. Ideally, apply it to a particle system if your game is first person (because particles are camera-facing by default), but you can add it to a plane as well if your game is isometric. This would compliment a lens flare quite nicely, but works well on its own.

Here’s a sample of what it looks like -

I’ve supplied the basics of what is needed to get you going. Just open the included sample scene and test it out.

I should mention that if this effect gains enough interest, I’ll start to put together very low costs texture packs.

What’s next?
As requested below, I will make some mobile friendly shaders and separate version for both particles and geo (for mobile and not).

Enjoy!

Tested and works in both PRO and Free versions of Unity 3.5

UPDATE
new version is up with separate shaders for both geometry and particles. it also includes versions that are mobile-friendlier. Get it while it’s hot!

UPDATE
Bug fixes and optimizations. I also added a new emitter to the package that’s tinted red to show that you can play around with the settings to get some interesting results.

Beautiful Effect! Love it :smile:
But I have a question. Dose this Effect Work With The Indie/Free Version Of Unity?
If So This is what I’m looking for.

Keep Up The Great Work It Amazing!
Frostbite23

damn, I actually don’t know. I have the pro version. I don’t think it uses anything that is pro-specific, but let me try to unlicense my Unity and test. Stay tuned.

Ok, just tried it out. It’s still working great in non-pro. You should be good to go. Keep in mind that this was tested locally after removing my PRO license, so if it still doesn’t work for you then I’m really sorry.

Thanks!

Looks amazing! Just one question - have you tested this on mobile? What’ s the performance like?
Also, will you be releasing more contents (eg. more dirty lens material) for this?

thank you for the feedback!

1-
I’ve not tested it on mobile, but like anything with mobile, it will have a hit. But if it means anything - it’s incredibly light, it doesn’t even show up on the profiler on my 2011 iMac (meaning the values are almost zero). Basically, it’s about the same weight as a lens flare. And like lens flares and particles, the thing to keep in mind is overdraw. There’s no avoiding that if you want it relative to the game world.

What I’ll do is make a version that’s the bare minimum, which would make it even lighter. I had plans to do that, I’ll just accelerate the plans. Any masking elements will be removed and will need to be done in the texture. I’ll leave the exposed multiplier though. That’s only two or three extra instructions. The added bonus of the intensity is that you can you can lerp it via scripting if need be.

Actually, better yet… I’ll make different versions for particle and for geo. The particle version needs a few more instructions.

Let me do that today and post it.

Thanks for the feedback, I was not expecting interest from the mobile world.

2 -
lens packs. This was something that I was planning on doing if this item gained enough popularity. Actually, I should probably put that in the original post.

Thanks again!

Awesome. Definitely on my to-buy list now.

Also, is Lens Packs going to be in the future update?

The pack will be its own thing. I may thrown one or two of them in an update to this though.

Thanks!

I’ll Give It A Try.
I’ll Let You Know When It Works
:slight_smile:

Keep Up The Great Work!
Frostbite23

Just purchased this in Unity 4 and noticed it doesn’t work with DX11.

Any thoughts?

Got it working. Unity 4 / DX11 changed some names around. Pretty easy fix.

Thanks! Great asset!

oh, so what was not working? meaning - what changed in U4 that caused it to not work?

Renamed:
EditorSurfaceOutput to SurfaceOutput
BlinnPhongEditor to BlinnPhong
#pragma target 2.0 to 3.0

Had to remove:
o.Custom = 0.0;
vertex:vert

Another question - would you sell a FULL pack - This + the texture pack in one package? I hate to be updating two packages all the time. Also maybe a bit of discount for buying both at once? :smile:

Interesting idea! I may do just that, and yes, at a discount for the full pack.

This looks brilliant, and a great price too! I have just one question - it looks like the effect is rendered based on the position of the particle effect. Any thoughts on how to tie this in to the rotation of a directional light?

Thanks!

Andy

thanks!

That would make it a lot tougher to use, but what you could do is then script an object to be camera-facing and then just scale the plane along with the rotation. This exact question would be where a proper lens flare system would be great. Unity’s lens flare is adequate at best and only supports textures - not shaders, sadly.

Love The Effect!
It Works Perfectly!
Cant Wait For More Updates! :smile:

Thank You!

Keep Up The Great Work! :smile:
Frostbite23

thank you for the kind words!

Nice material, Looks perfect !