TES Skyrim 0.251

Forum rules
new topics are not allowed in this subsection, only replies.
  • Author
  • Message
Offline
User avatar
*master*
Posts: 137
Joined: 07 Jan 2012, 16:28

Re: TES Skyrim 0.251

Oyama wrote:Saberus
Are you just working with the right shader ?
I know it sounds like a noob question , apologizes if so.
Lenz related codes have been ported to enblens from enbbloom some time ago.
Oyama
Yeah i know about the lenz shader ;p
But this bloom code is not working from ENB 0.166 and external lenz shader was introduced in ENB 0.223, so Boris has cut something or change variables, but let's say i'm gonna move lenz parameters from bloom to lenz shader so exactly what lines should i remove from bloom and put in lenz ?

This is the new code compared to standard .251 bloom file:

Code: Select all

	float TBloomContrast=10.0;//tweak this
    float maxb=max(bloom.x, max(bloom.y, bloom.z));
    float tempnorb=(maxb/(1.0+maxb));
    tempnorb=pow(tempnorb, TBloomContrast);
    bloom.xyz*=tempnorb;

	float3 lenz=0;
	float2 lenzuv=0.0;
	//deepness, curvature, inverse size
	const float3 offset[4]=
	{
		float3(1.6, 4.0, 1.0),
		float3(0.7, 0.25, 2.0),
		float3(0.3, 1.5, 0.5),
		float3(-0.5, 1.0, 1.0)
	};
	//color filter per reflection
	const float3 factors[4]=
	{
		float3(1.0, 1.0, 1.0),
		float3(1.0, 1.0, 1.0),
		float3(1.0, 1.0, 1.0),
		float3(1.0, 1.0, 1.0)
	};

//lenzuv.xy=0.5-lenzuv.xy;
//distfact=0.5-lenzuv.xy-0.5;

	if (LenzParameters.x>0.00001)
	{
		for (int i=0; i<4; i++)
		{
			float2 distfact=(In.txcoord0.xy-0.5);
			lenzuv.xy=offset[i].x*distfact;
			lenzuv.xy*=pow(2.0*length(float2(distfact.x*ScreenSize.z,distfact.y)), offset[i].y);
			lenzuv.xy*=offset[i].z;
			lenzuv.xy=0.5-lenzuv.xy;//v1
	//		lenzuv.xy=In.txcoord0.xy-lenzuv.xy;//v2
			float3 templenz=tex2D(SamplerBloom2, lenzuv.xy);
			templenz=templenz*factors[i];
			distfact=(lenzuv.xy-0.5);
			distfact*=2.0;
			templenz*=saturate(1.0-dot(distfact,distfact));//limit by uv 0..1
	//		templenz=factors[i] * (1.0-dot(distfact,distfact));
			float maxlenz=max(templenz.x, max(templenz.y, templenz.z));
/*			float3 tempnor=(templenz.xyz/maxlenz);
			tempnor=pow(tempnor, tempF1.z);
			templenz.xyz=tempnor.xyz*maxlenz;
*/
            float maxlenz=max(templenz.x, max(templenz.y, templenz.z));
            float tempnor=(maxlenz/(1.0+maxlenz));
            tempnor=pow(tempnor, LenzParameters.y);
            templenz.xyz*=tempnor;

	//		templenz*=maxlenz*maxlenz;
			lenz+=templenz;
	//		lenz.xyz=max(lenz.xyz, templenz.xyz*0.99);
		}
		lenz.xyz*=0.25*LenzParameters.x;

		bloom.xyz+=lenz.xyz;
//		bloom.w=dot(lenz.xyz, 0.333);
		bloom.w=max(lenz.xyz, max(lenz.y, lenz.z));
	}
[/size]
_________________
XEON E5450 @3.0ghz, 6GB Ram, Geforce GTX 660 2GB, Win7 64bit

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: TES Skyrim 0.251

Saberus
It's a problem with dimensions, but I am too busy at this moment to have a real good look at it. It says in the error it's being truncated... tbh I have not taken a good look at it in the first place, just the line that gave error, figured easy fix by just putting it as float4 (as it appears to be a float4 instead of 3) but apparently not :[

Offline
*sensei*
Posts: 289
Joined: 08 Dec 2012, 23:05

Re: TES Skyrim 0.251

thalixte wrote:...

Code: Select all

[Memory]
DefaultHeapInitialAllocMB=1024
ScrapHeapSizeMB=512
in skse.ini and i have no more CTDs. Sheson's fix works like a charm, as well as enboost, and there is no conflict between them.
Could you please try 768/512 and 768/256 in SKSE.ini?
_________________
i5 2500k@4.0ghz - 24Gb RAM - R9-290 4Gb Tri-X - SSD 240gb Intel 520 - Win7x64

Offline
User avatar
Posts: 42
Joined: 19 Jan 2014, 14:14
Location: Hanoi, Vietnam

Re: TES Skyrim 0.251

@jonwd
jonwd7 wrote:This doesn't work:

Code: Select all

[Memory]
DefaultHeapInitialAllocMB=768
ScrapHeapSizeMB=512
Well, that's a problem right there, because those skse.ini settings will result in allocations of 512MB for both block 1 and 2.

In sheson's OP he recommended an allocation of 512MB for block 1 and leaving block 2 at the default 256MB.

Although it's still unclear how the two allocated blocks of memory are related to each other, it was found there was no reason to increase the allocation for block 2 unless block 1 is set to 768 or higher. I have also read that some people found that increasing block 1 and 2 both to 512MB lead to crashes.

So that may very well be the reason, and you should try using sheson's initial suggested values, 512/256, which in the skse.ini are entered as 768/256.

Anyhow, solving the CTD issue is better discussed in the Skyrim Memory Patch thread since it seems to be related to your allocation settings.
_________________
EVGA GTX 760 4GB | i5-4590 Quad 3.3Ghz | ASRock Z87E-ITX | 16GB Crucial DDR3-1600 | 240GB SSD + 3TB HDD | Win7 x64

Offline
Posts: 39
Joined: 08 Jan 2014, 14:59
Location: Lyon, France

Re: TES Skyrim 0.251

Uriel24 wrote:
thalixte wrote:...

Code: Select all

[Memory]
DefaultHeapInitialAllocMB=1024
ScrapHeapSizeMB=512
in skse.ini and i have no more CTDs. Sheson's fix works like a charm, as well as enboost, and there is no conflict between them.
Could you please try 768/512 and 768/256 in SKSE.ini?
No, you can't try 768/512 with skse 1.7.0alpha, if you are preloading animations (which is, by default, the behaviour of the engine - correct me if i am wrong). It is a common mistake made by those who used the previous skse versions compiled with sheson's fix. You must set the DefaultHeapInitialAllocMB to the desired value+256, as it is mentioned in the code.

Code: Select all

void Hooks_Memory_PreloadCommit(void)
{
	// these are the values used by the game
	const UInt32 kVanilla_defaultHeapInitialAllocMB = 256 + 256;
	const UInt32 kVanilla_scrapHeapSizeMB = 256;

	// clamp to these values because going over that is stupid
	const UInt32 kMax_defaultHeapInitialAllocMB = 1024 + 256;
	const UInt32 kMax_scrapHeapSizeMB = 512;

	// in megabytes, -256 depending on bInitiallyLoadAllClips:Animation
	UInt32 defaultHeapInitialAllocMB = kVanilla_defaultHeapInitialAllocMB;
	UInt32 scrapHeapSizeMB = kVanilla_scrapHeapSizeMB;

	GetConfigOption_UInt32("Memory", "DefaultHeapInitialAllocMB", &defaultHeapInitialAllocMB);
	GetConfigOption_UInt32("Memory", "ScrapHeapSizeMB", &scrapHeapSizeMB);

	if(	(defaultHeapInitialAllocMB != kVanilla_defaultHeapInitialAllocMB) ||
		(scrapHeapSizeMB != kVanilla_scrapHeapSizeMB))
	{
		_MESSAGE("overriding memory pool sizes");

		if(defaultHeapInitialAllocMB > kMax_defaultHeapInitialAllocMB)
		{
			_MESSAGE("%dMB default heap is too large, clamping to %dMB. using your value will make the game unstable.", defaultHeapInitialAllocMB, kMax_defaultHeapInitialAllocMB);
			defaultHeapInitialAllocMB = kMax_defaultHeapInitialAllocMB;
		}

		if(scrapHeapSizeMB > kMax_scrapHeapSizeMB)
		{
			_MESSAGE("%dMB scrap heap is too large, clamping to %dMB. using your value will make the game unstable.", defaultHeapInitialAllocMB, kMax_defaultHeapInitialAllocMB);
			scrapHeapSizeMB = kMax_scrapHeapSizeMB;
		}

		_MESSAGE("default heap = %dMB (effective %dMB if not preloading animations)", defaultHeapInitialAllocMB, defaultHeapInitialAllocMB - 0x100);
		_MESSAGE("scrap heap = %dMB", scrapHeapSizeMB);

		SafeWrite32(0x00687E87 + 2, defaultHeapInitialAllocMB); // will eventually be multiplied by 1024 * 1024
		SafeWrite32(0x00A4E6BE + 1, scrapHeapSizeMB * 1024 * 1024); // passed directly to VirtualAlloc
	}
}
Check with vmmap or skse_steam_loader.log, you will see that DefaultHeapInitialAllocMB=1024 leads to a size of the memory allocation block1 of 768 Mo, and DefaultHeapInitialAllocMB=768 leads to a size of the memory allocation block1 of 512 Mo. ;)

I already tried 768/256 wich corresponds to 512/256. It works perfectly too, but i prefer to get some margin (even if memory block allocation size cannot exceeds 600 Mo).

Offline
*sensei*
Posts: 289
Joined: 08 Dec 2012, 23:05

Re: TES Skyrim 0.251

Again plz. Why can't i run 728/512? To get 512/512 blocks?
_________________
i5 2500k@4.0ghz - 24Gb RAM - R9-290 4Gb Tri-X - SSD 240gb Intel 520 - Win7x64

Offline
Posts: 39
Joined: 08 Jan 2014, 14:59
Location: Lyon, France

Re: TES Skyrim 0.251

Uriel24 wrote:Again plz. Why can't i run 728/512? To get 512/512 blocks?
Sorry, i thought you planned to use 768/512. I think you'd better ask Sheson for such a question...

Offline
*sensei*
Posts: 331
Joined: 20 Jul 2013, 00:34

Re: TES Skyrim 0.251

Hope this is still ENB forum not SKSE.
I'm trying to "group" the settings in the Shader Parameters window for enbeffect.fx that can be collapsed like the enbseries.ini window EFFECT, etc. collapsing groups. I have whole bunch of bloom related Spinner UIWidgets, and the Shader parameters window is getting vertically showing too much information. Anyone know how this can be done?
_________________
AMD R9 6900HX, 16GB DDR5-4800
Win 11Pro 64bit on NvMe, Skyrim on NvMe 2nd partition
Nvidia GTX 1070 FE eGPU v531.209
OrganicENB SE
OrganicENB LE

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

Re: TES Skyrim 0.251

jonwd7
First, i've compiled SKSE myself because of security reasons. Second, if it compiled successfully, then it works the same as binaries from silverlock site. To check if skse started successfully, i increased allocation buffer size too much and game refused to start. Increasing allocation size "properly" do not crash. Isn't that enough for testing?
I'm beginning to suspect skse plugins. Can't test on OS which have 4 gb address space, but the problem may be the bug on such when pointer address is 2gb+ (i don't use any math with pointers). Also i don't see the difference between sheson patch and implemented in skse, so why sheson's works? May be because skse make changes in wrong time? Sorry, that's not the thing id' like to debug, all i can do is to make one step to check if it fails and return to previous allocation method, but don't think it will help (need testers then).
At last, why do you act like i'm stubborn idiot, as most programmers are? I'm always accept any opinions and if i wrong, don't see the reason to say that's i'm right, at least if it's prooved. Don't take me like a kid just because you don't understand me (and i'm very unusual person even for my country). Btw, skse authors do not bother to contact me and they ignored my e-mail previously, so why the heck should i care about this?
until the next release where he realizes that we were (in some way) right.
Or may be it's you only think so?
DefaultHeapInitialAllocMB=768
Meaning, anything but the defaults becomes useless
Rly??? Defaults are 256! Windows can't allocate more than 650 mb single memory block for x86 process and this depends from various conditions, dlls loaded, os type, etc, that's why i suggested in path to preallocate memory block and check if it fail, then try to allocate smaller. Should i do this in ENBoost then? Fine, but then you will say that it's my bug and i get it fixed in new version. Go to hell man, it's not funny, i'm always doing workarounds and you call them fixes of my bugs.
PS: i forced values when tested by removing conditional jumps in skse patch.

I'm very interested in these memory patches and preparing new powerful ENBoost features, so stop acting like that and better search the reasons of the problem.


offtop: i'm very addicted by FF14 atm and trying to finish story line to relax a little. strange game, i don't have that cool feeling of the best singleplayer games when played in the past, but rather like food. hope this will end soon.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
User avatar
*blah-blah-blah maniac*
Posts: 572
Joined: 23 Aug 2013, 21:59
Location: United States

Re: TES Skyrim 0.251

Boris
off-topic: Haha, I was wondering why there were less updates than usual! No worries, actually gives us a little time to catch our breaths and work on refining our existing presets :) Glad you're having fun with FFXIV. I've been thinking about getting for awhile, still not sure.
_________________
AMD Ryzen 5 3600 6C/12T @4.4GHz // 16GB G.Skill Ripjaws V DDR4 3600MHz // ASRock AMD Radeon 5700XT Taichi X 8GB OC+// Samsung 850 Evo 256GB and 500GB SSD // 4 TB Seagate Barracuda // Windows 10 x64
Lumen ENB
My Flickr
Post Reply