Help in my Shader Learning Journey.....

share shaders here
  • Author
  • Message
Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: Help in my Shader Learning Journey.....

thanks guys.
Σ>―(°ω°)

@ibbanez
Imo, sections are fine, keep things nice and tidy.

About outlines or general structure, I mean, what is there is there, but there is no rule on how you do with it.
Only thing off is cut scenes.. You have to move the stick over to line up right
it just make focus point on dead center (inefficiently). And as a contemporary answer to the request, do not include it in released preset.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
User avatar
*blah-blah-blah maniac*
Posts: 849
Joined: 28 Dec 2011, 00:50

Re: Help in my Shader Learning Journey.....

@Kingeric1992

I made a video showing people how to make this change in their enbdepthoffield.fx file, because I find that it makes the effect much more enjoyable. I give you a big 'shout out' in the towards the middle of the video and again towards the end ... I hope you don't mind! :)

https://www.youtube.com/watch?v=79mucc9hUtk]
_________________
Fallout 4 ENB Video Series | Skyrim ENB Video Series | My YouTube Channel
Intel i7-4700HQ @ 2.4GHz | NVidia GTX780M 4GB | 24GB RAM

Offline
Posts: 9
Joined: 18 Sep 2013, 23:23

Re: Help in my Shader Learning Journey.....

Just saw tapioks' video on fixing the DoF shader code.
kingeric1992 wrote:3.1 change this under PS_ReadFocus will make dof focus on screen center.

Code: Select all

//  original	        float	tempcurr=TextureDepth.SampleLevel(Sampler0, coord, 0.0).x;
			float	tempcurr=TextureDepth.SampleLevel(Sampler0, 0.5, 0.0).x; // <--replace coord to 0.5
What is the default implementation trying to accomplish with the coord calculation?

Seems like you'd probably want to comment out the two lines above too, for efficiency (or does the shader compiler optimize them away? I don't know anything about shader programming)

Edit: For reference, here's the original code:

Code: Select all

			float2	coord=pos.xy * 0.05;
			coord+=IN.txcoord0.xy * 0.05 + float2(0.5, 0.5); //somewhere around the center of screen
			float	tempcurr=TextureDepth.SampleLevel(Sampler0, coord, 0.0).x;

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: Help in my Shader Learning Journey.....

HunterZ wrote:What is the default implementation trying to accomplish with the coord calculation?
I think it averages depth on 1/10 of screen area over bottom left corner next to center point with exclusion on objects that comes too close.

I didn't check the ASM, but the compiler might step in and do the optimization.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube
Post Reply