As it’s a new website, let’s celebrate this in a cool way. I’m going to share with you how to put some dirty lens on your ENB settings.
What you’ll need, first :
- GTA IV or even Skyrim.
- Small knowledge in the .fx files.
- Hands, bionic or not.
- A texture.
- UsePaletteTexture to 1 in the INI
[image source=’http://icelaglace.com/assets/uploads/2013/06/post-162172-0-73627800-1329937358_thumb1.jpg’ width=’100′ height=’100′ title=’Dirty Lens Texture example’ colorbox=’true’ color_overlay=’dark’ icon_overlay=’down’] [blockquote source=’Someone who cares about you’]Get this example, if you don’t have any. Save it & open it on Paint. Then re-save it to BMP.[/blockquote]
First thing to do is to identify what name is used for your main texture (the color) : By default it’s r0 but it can be color. Easy way to know is to search for “color=r0”. If not, then it’ll be r0 for you.
But keep in mind you can just do :
[code]float4 color = r0;[/code]
Once you know what’s going on, try to find where the bloom is getting done. Bloom by default is r2 but it can be colorBloom. Same thing as before, you can just put another float if you want.
What we will look for now, is the palette. ENB loads an external palette file in BMP, it has to be registered in your .fx (normally is)
– Remove the part where the palette is done (normally at the end of the code before the original game post effect ASM code)
– Now place this part before the bloom computation :
[code]//dirty lens code
float4 dirtPaletteTex=tex2D(s13, _v0.xy); //use the palette texture for the lens
float4 uvsrc=0.0; //set the UVs
Once it’s done, place this thing above where the bloom is done :
[code]colorBloom.xyz+=colorBloom.xyz*lensDirt.xyz*0.2; // 0.2 is the intensity[/code]
Then you can merge your colorBloom to r0 or color.xyz.
It is a very simple code, you can if you want add a threshold & more.
I suggest you to do a very contrasted image for the palette so the white will be illuminated with the bloom & not the black parts.
If you need more help or suggestions. Feel free to comment or anything.
(thanks to gp65cj04 too)