• Announcements

    • Ashal

      SITE MOVED - IN READ ONLY MODE   12/08/2015

      Please use http://www.loverslab.com moving forward. Site has been restored to a previous version, and this one placed into a read-only mode. This is available for a limited time so users may reference/copy content that has been lost in the transition. This will no longer be accessible by December 22nd, 2015.

Archived

This topic is now archived and is closed to further replies.

HanPL

OBGE 3 Color Problem

Yo all I wanted to try new OBGE 3 but have this problem with Color Shader...

I tried to re-install it change values but all I got was this

Oblivion2011-08-2215-03-29-34.jpg

Shader folder looks like this :

shader.jpg

I was using Wrye Bash to insall Core + Standalone pack.

here is how OBGE.ini looks like

[DepthBuffer]

bUseDepthBuffer=1

bUseRAWZfix=1

[Effects]

bUseEffectList=1

sEffectDirectory=data\shaders\

sEffectListFile=data\shaders\shaderlist.txt

bUseLegacyCompiler=0

bOptimize=0

bRenderHalfScreen=0

bPurgeOnNewGame=0

bNoShadersInMenus=0

bTailEffects=0

[screenBuffers]

iBufferTexturesNumBits=0

iBufferRawZDepthNumBits=0

iReflectionMapSize=0

iWaterHeightMapSize=0

iWaterDisplacementMapSize=0

iAutoGenerateMipMaps=2

iBufferZDepthNumBits=0

[serialization]

bSaveData=1

bLoadData=1

[PluginInterOp]

bEnableInterOp=0

[General]

bEnabled=1

[shaders]

bUseShaderOverride=1

bUseLegacyCompiler=0

bSaveShaderOverride=1

bCompileSources=0

bRuntimeSources=0

bOptimize=0

bMaximumSM=0

bUpgradeSM1X=0

sShaderOverrideDirectory=data\shaders\override\

[Textures]

bPurgeOnNewGame=0

Every other shader works fine only Colors are mess up.

0

Share this post


Link to post

You get that because the shader ColorEffects.fx has color invert on by default. You can edit the shader using notepad and delete the defaults or you can copy mine to your ColorEffects.fx shader (I've already edited the values to my liking though..)

/* Full Screen Colour Effects Shader by WrinklyNinja. Release Version 5.

* Gamma Alterations code by Donovan Baarda .

*

* Contains the following applicable effects:

* Luminosity-Dependent Film Grain

* Sepia

* Saturation/Contrast/Brightness Alteration

* Gamma (non-linear) Contrast/Brightness Alteration

* Colour Inversion

* Blur Highlighting

*

* To Do:

* A better film grain noise.

* More effects!

*/

// ---------------------------------------

// TWEAKABLE VARIABLES.

#define BLURHIGHLIGHT

//#define SEPIA

//#define COLORINVERT

//Toggles for the on/off effects. 1 is enabled, and 0 is disabled.

extern float Saturation = 0.5;

//Saturation: Scales the saturation level.

//1 is vanilla, less than 1 decreases it, greater than 1 increases it.

extern float Brightness = 1.1;

//Brightness: Scales the brightness level.

//1 is vanilla, less than 1 decreases it, greater than 1 increases it.

extern float Contrast = 1;

//Contrast: Scales the contrast level.

//1 is vanilla, less than 1 decreases it, greater than 1 increases it.

extern float GContrast = 1.6;

//Gamma Contrast: Scales the contrast level.

//Default = 1.

extern float GBrightness = 1.2;

//Gamma Brightness: Scales the brightness level.

//Default = 1.

extern float FGIntensity = 0.1;

//Film Grain: Controls the intensity of the noise. 0 = no effect, 1 = full effect.

//Default = 0.3.

extern float BHMagnitude = 1.42;

//Blur Highlight: Controls the size of the blur.

//Default = 10.

extern float BHBrightness = 9;

//Blur Highlight: Corrects the darkening of the screen the effect causes.

//Default = 4.

// END OF TWEAKABLE VARIABLES.

// ---------------------------------------

float4 f4Time;

float2 rcpres;

texture obge_LastRendertarget0_EFFECTPASS;

sampler PassSampler = sampler_state {

texture = ;

AddressU = CLAMP;

AddressV = CLAMP;

MINFILTER = POINT;

MAGFILTER = POINT;

};

static const float3 greyscale = float3(0.299, 0.587, 0.114);

static const float BlurWeights[13] = {

0.057424882f,

0.058107773f,

0.061460144f,

0.071020611f,

0.088092873f,

0.106530916f,

0.114725602f,

0.106530916f,

0.088092873f,

0.071020611f,

0.061460144f,

0.058107773f,

0.057424882f

};

static const float2 BlurOffsets[13] = {

float2(-6.0f * rcpres[0], -6.0f * rcpres[1]),

float2(-5.0f * rcpres[0], -5.0f * rcpres[1]),

float2(-4.0f * rcpres[0], -4.0f * rcpres[1]),

float2(-3.0f * rcpres[0], -3.0f * rcpres[1]),

float2(-2.0f * rcpres[0], -2.0f * rcpres[1]),

float2(-1.0f * rcpres[0], -1.0f * rcpres[1]),

float2( 0.0f * rcpres[0], 0.0f * rcpres[1]),

float2( 1.0f * rcpres[0], 1.0f * rcpres[1]),

float2( 2.0f * rcpres[0], 2.0f * rcpres[1]),

float2( 3.0f * rcpres[0], 3.0f * rcpres[1]),

float2( 4.0f * rcpres[0], 4.0f * rcpres[1]),

float2( 5.0f * rcpres[0], 5.0f * rcpres[1]),

float2( 6.0f * rcpres[0], 6.0f * rcpres[1])

};

struct VSOUT

{

float4 vertPos : POSITION;

float2 UVCoord : TEXCOORD0;

};

struct VSIN

{

float4 vertPos : POSITION0;

float2 UVCoord : TEXCOORD0;

};

VSOUT DummyVS(VSIN IN)

{

VSOUT OUT = (VSOUT)0.0f; // initialize to zero, avoid complaints.

OUT.vertPos = IN.vertPos;

OUT.UVCoord = IN.UVCoord;

return (OUT);

}

float3 Sepia(float3 frame) {

return max(0, dot(greyscale, frame) + float3(0.191, -0.054, -0.221));

}

float3 ColorInvert(float3 frame) {

return max(0, 1 - frame);

}

float3 AlterSatBrightCont(float3 frame) {

frame = lerp(dot(greyscale, frame), frame, Saturation);

frame *= Brightness;

frame = lerp(0.5, frame, Contrast);

return frame;

}

float3 FilmGrain(float3 frame, float2 UVCoord) {

float gradient = f4Time.x % (20000 * 3.141592654);

float x = UVCoord.x * UVCoord.y * gradient;

x = fmod(x, 13) * fmod(x, 123);

float dx = fmod(x, 0.01);

float lum = saturate(1 - dot(greyscale,frame));

float3 framenoise = frame + frame * saturate(0.1f + dx.xxx * 100);

framenoise = lerp(frame, framenoise, FGIntensity * lum);

framenoise = framenoise / (1 + FGIntensity / 2);

return framenoise;

}

float3 BlurHighlight(float3 frame, float2 UVCoord) {

float3 blur = 0;

for (int k = 0; k < 13; k++) {

blur += tex2D(PassSampler, UVCoord + (BlurOffsets[k] * float2(0, 1) * BHMagnitude) * BlurWeights[k]);

blur += tex2D(PassSampler, UVCoord + (BlurOffsets[k] * float2(1, 0) * BHMagnitude) * BlurWeights[k]);

}

blur = (blur / 24) - frame;

return lerp(frame, blur, 1) * BHBrightness;

}

//Originally written by Donovan Baarda.

float3 GammaContrast(float3 color) {

return pow(color, GContrast) / (pow(saturate(color), GContrast) + pow(1.0 - saturate(color), GContrast));

}

//Originally written by Donovan Baarda.

float3 GammaBrightness(float3 color) {

return pow(color, 1.0 / max(0.0001, GBrightness));

}

float4 ApplyEffects(float2 UVCoord : TEXCOORD0) : COLOR0

{

float3 frame = tex2D(PassSampler, UVCoord).rgb;

frame = AlterSatBrightCont(frame);

frame = GammaBrightness(frame);

frame = GammaContrast(frame);

frame = FilmGrain(frame, UVCoord);

return float4(frame, 1);

}

technique t0

<

int group = EFFECTGROUP_POST;

int fxclass = EFFECTCLASS_COLOR;

>

{

pass p0 {

VertexShader = compile vs_3_0 DummyVS();

PixelShader = compile ps_3_0 ApplyEffects();

}

}

0

Share this post


Link to post

Fixed that already had to edit ColorEffects.fx like you said and edit

#undef BLURHIGHLIGHT

#undef SEPIA

#undef COLORINVERT

now everything is working fine :D

0

Share this post


Link to post

Fixed that already had to edit ColorEffects.fx like you said and edit

#undef BLURHIGHLIGHT

#undef SEPIA

#undef COLORINVERT

now everything is working fine :D

I wouldn't recomenend using undef command, as that has a chance of breaking the shader.

The best way is to delete these from your coloreffects.fx

#ifdef BLURHIGHLIGHT

frame = BlurHighlight(frame, UVCoord);

#endif

#ifdef COLORINVERT

frame = ColorInvert(frame);

#endif

#ifdef SEPIA

frame = Sepia(frame);

#endif

0

Share this post


Link to post
Guest
This topic is now closed to further replies.