As of now I am aware of 2 method of doing in-game LUT changing,
one is selecting through "technique", the way how Snapdragon ENB did, which seems to be able to support a lot of LUTs
the other one is recently I discovered used in QIRE ENB, while not configured by default,
I try to code it myself to add more LUTs, and find that it only can reach 13 LUT files max, otherwise it just crash.
File as in this link: https://drive.google.com/open?id=1dRdB7 ... 5bSmokiQX_
I just "declare" the LUT files like this, for multiple sets:
Code: Select all
///LUT1
texture2D texLUTD1 < string ResourceName="enblutd1.png"; >;
texture2D texLUTN1 < string ResourceName="enblutn1.png"; >;
texture2D texLUTI1 < string ResourceName="enbluti1.png"; >;
sampler2D samplerLUTD1 = sampler_state
{
Texture = <texLUTD1>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D samplerLUTN1 = sampler_state
{
Texture = <texLUTN1>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D samplerLUTI1 = sampler_state
{
Texture = <texLUTI1>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
///
Code: Select all
///LUT-MOD SELECTOR START
if ( LUTType == 1 )
{
color.rgb = lerp(lerp(ClutFunc(color.rgb, samplerLUTN1), ClutFunc(color.rgb, samplerLUTD1), ENightDayFactor), ClutFunc(color.rgb, samplerLUTI1), EInteriorFactor);
}else if ( LUTType == 2 )
{
color.rgb = lerp(lerp(ClutFunc(color.rgb, samplerLUTN2), ClutFunc(color.rgb, samplerLUTD2), ENightDayFactor), ClutFunc(color.rgb, samplerLUTI2), EInteriorFactor);
}else if ( LUTType == 3 )
{
color.rgb = lerp(lerp(ClutFunc(color.rgb, samplerLUTN3), ClutFunc(color.rgb, samplerLUTD3), ENightDayFactor), ClutFunc(color.rgb, samplerLUTI3), EInteriorFactor);
}else if ( LUTType == 4 )
{...................................................
Is the above method is actually "valid" or safe at all? :?: