SSE vs Oldrim Sampler States & Game/ENB Parameters

Post Reply
  • Author
  • Message
Offline
*sensei*
Posts: 286
Joined: 20 Sep 2012, 00:20
Location: the perfect system

SSE vs Oldrim Sampler States & Game/ENB Parameters

Greetings,

I was hoping to get some input on whether it is possible to map the old Skyrim Sampler States to the new dx11 SSE.

Here is the old code:

Code: Select all

	texture2D texs0; // color
	texture2D texs1; // bloom skyrim
	texture2D texs2; // adaptation skyrim
	texture2D texs3; // bloom enb
	texture2D texs4; // adaptation enb

	sampler2D _s0 = sampler_state {
		Texture = <texs0>;
		MinFilter = POINT;
		MagFilter = POINT;
		MipFilter = NONE; // LINEAR;
		AddressU = Clamp;
		AddressV = Clamp;
		SRGBTexture = FALSE;
		MaxMipLevel = 0;
		MipMapLodBias = 0;
	};

	sampler2D _s1 = sampler_state {
		Texture = <texs1>;
		MinFilter = LINEAR;
		MagFilter = LINEAR;
		MipFilter = NONE; // LINEAR;
		AddressU = Clamp;
		AddressV = Clamp;
		SRGBTexture = FALSE;
		MaxMipLevel = 0;
		MipMapLodBias = 0;
	};

	sampler2D _s2 = sampler_state {
		Texture = <texs2>;
		MinFilter = LINEAR;
		MagFilter = LINEAR;
		MipFilter = NONE; // LINEAR;
		AddressU = Clamp;
		AddressV = Clamp;
		SRGBTexture = FALSE;
		MaxMipLevel = 0;
		MipMapLodBias = 0;
	};

	sampler2D _s3 = sampler_state {
		Texture = <texs3>;
		MinFilter = LINEAR;
		MagFilter = LINEAR;
		MipFilter = NONE; // LINEAR;
		AddressU = Clamp;
		AddressV = Clamp;
		SRGBTexture = FALSE;
		MaxMipLevel = 0;
		MipMapLodBias = 0;
	};

	sampler2D _s4 = sampler_state {
		Texture = <texs4>;
		MinFilter = LINEAR;
		MagFilter = LINEAR;
		MipFilter = NONE; // LINEAR;
		AddressU = Clamp;
		AddressV = Clamp;
		SRGBTexture = FALSE;
		MaxMipLevel = 0;
		MipMapLodBias = 0;
	};
I know a lot has changed from ps3 to ps5 and while it is hard for me now after the stroke to really dig into things, I would like to know if it is possible and maybe test things out at a slower pace.

I have seen declarations like this:

Code: Select all

float grayadaptation=TextureAdaptation.Sample(Sampler0, IN.txcoord0.xy).x;
Would that be the analog for the old texture2D texs4; (adaptation enb) or for texture2D texs2; (adaptation skyrim)?

What would be REALLY helpful would be a direct conversion for the following:

Code: Select all

texture2D texs0; // color					SSE = 
texture2D texs1; // bloom skyrim				SSE = 
texture2D texs2; // adaptation skyrim		SSE = 
texture2D texs3; // bloom enb					SSE = 
texture2D texs4; // adaptation enb			SSE = 
For Palette, I see Boris has posted a way to get a similar functionality in SSE here:
Palette for dx11 versions of the mod (SkyrimSE, Fallout4)

Looking at the new enbeffect.fx:

Code: Select all

Texture2D			TextureColor; //hdr color
Texture2D			TextureBloom; //vanilla or enb bloom
Texture2D			TextureLens; //enb lens fx
Texture2D			TextureDepth; //scene depth
Texture2D			TextureAdaptation; //vanilla or enb adaptation
Texture2D			TextureAperture; //this frame aperture 1*1 R32F hdr red channel only. computed in depth of field shader file
Would TextureColor be more or less the same as the old texs0?

Also, instead of texs1 and texs3 (Skyrim and ENB bloom) we now have TextureBloom (vanilla or enb bloom). Does it contain both or either or depending on using vanilla or ENB post processing?

If both how to reference each? One at .x and one at .y? If so which is which?

Thanks in advance for any insight. Not a shader programmer. :)

Offline
*sensei*
Posts: 286
Joined: 20 Sep 2012, 00:20
Location: the perfect system

Re: SSE vs Oldrim Sampler States & Game/ENB Parameters

I am also hoping to find out the references to base game registers. In old Skyrim, the original post process section laid them out nicely:

Code: Select all

// Registers:
//   Name         Reg   Size
//   ------------ ----- ----
//   ColorRange   c1       1
//   Param        c2       1
//   Cinematic    c3       1
//   Tint         c4       1
//   Fade         c5       1
//   Image        s0       1
//   Blend        s1       1
//   Avg          s2       1
Does anyone know the equivalent for SSE?

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: SSE vs Oldrim Sampler States

Everything is convertable. Sampler0 in SSE is equal to _s0 in old Skyrim, Sampler1 in SSE equal to all other samplers in old Skyrim. All textures are mapped, but SSE own textures are no longer split from ENBSeries textures, so instead of:
texture2D texs1;//bloom skyrim
texture2D texs3;//bloom enb
only one texture now TextureBloom. Same about adaptation, but this is a bit different, because game adaptation is 2 channel texture, while ENBSeries adaptation still same as before, so SSE adaptation used only when original shader code is enabled by UseOriginalPostProcessing.
texture2D texs0; // color SSE =TextureColor.
texture2D texs1; // bloom skyrim SSE =TextureBloom if original bloom is activated in enbseries.ini.
texture2D texs2; // adaptation skyrim SSE =TextureAdaptation if UseOriginalPostProcessing=true and only in technique11 ORIGINALPOSTPROCESS.
texture2D texs3; // bloom enb SSE =TextureBloom.
texture2D texs4; // adaptation enb SSE =TextureAdaptation.
Would TextureColor be more or less the same as the old texs0?
It's exactly the same.
I am also hoping to find out the references to base game registers.
Search in kingeric1992 posts
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
*sensei*
Posts: 286
Joined: 20 Sep 2012, 00:20
Location: the perfect system

Re: SSE vs Oldrim Sampler States & Game/ENB Parameters

Thanks Boris, for taking the time and for all your work on ENB. This looks like a good place to start.

I will do some forum searches. :)
Post Reply