Page 1 of 1

new effect.txt question

Posted: 02 Mar 2014, 18:05
by prod80
I guess to Boris, unless someone else knows.

So, we now have 2 textures in effect.txt, Original and one that will change with each pass. If I get this right this means that for blurring and blending techniques I first have to run an "empty" pass like:

SamplerColor2 is <texColor> SamplerColor is <texOriginal>

Code: Select all

float4 PS_ProcessOriginal(VS_OUTPUT_POST IN) : COLOR
{
	float4 color	= tex2D(SamplerColor2, IN.txcoord.xy);
	color.xyz		= saturate(color.xyz);
	color.w			= 1.0f;
	return color;
}

...other stuff

technique PostProcess
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessOriginal();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}
Or, is texOriginal already filled?

Another question... at one point between the passes, is there a way to write again to texOriginal or is it a one time only on the first pass? Does it change anywhere between techniques, eg; I have 1 technique with 8 passes, and another with 4 passes. The first technique first pass will fill texOriginal and any of the other passes can use it to do effects against... now I have another technique with 4 passes, will the first pass of that technique change texOriginal again? (will texOriginal be the result of the first technique if I do so?)

And last question; how many techniques/passes can the file have? I believe it was 8, but can't recall clearly.

I already have the whole file working, just checking for optimizations and/or if I can expand what it does...

Re: new effect.txt question

Posted: 02 Mar 2014, 20:47
by prod80
After some testing it appears to take the result of P0 in the first technique, but wont update on the P0 of the second technique :( any chance this behavior can be changed? If that can change I can port all kind of nice bloom, contrast and sharpening techniques to a single effect file...

Unless I do something utterly wrong...

removed code, had bug, Gaussian was working only in 1 direction... I guess all effects must have their own technique. O well. In that case it doesn't matter.

Re: new effect.txt question

Posted: 03 Mar 2014, 10:00
by ENBSeries
texOriginal is not for writing, it's unchanged for all passes.
8 passes max.

Re: new effect.txt question

Posted: 03 Mar 2014, 10:24
by prod80
ok clear, so before first pass texColor and texOriginal are identical textures, and texOriginal will not change on all the passes...