Jump to content

Photo

Oblivion Graphics Extender v2


  • Please log in to reply
1695 replies to this topic

#1651
nery89

nery89

    Regular

  • Members
  • PipPip
  • 88 posts

OBGEv3

i have some problems:

1) crash to desktop if I don't have, in the folder with the shaders, a bounch of "shaderpackageXXX.sdp" (XXX = 001 ... 019), and I don't know why, since the archive of OBGEv3 and related effects plugin don't provide them. Me neither know how I manage to get them in a remote past and currently I don't know where to find them again.

2) LightShafts_PCS.fx seems to not work at all.... godrays.fx is perfect tough. I downloaded the archive from tesnexus.

anyone know if i'm doing things wrong?

 

the obge log say this warning:

Hooked: kernel32.dll
Hooked: kernel32.dll
Hooked: user32.dll
Hooked: d3dx9_27.dll
Hooked: d3dx9_43.dll
Detoured GetRenderedSurfaceParameters(); succeeded
Replacing the built-in shaders.
Detoured GetShaderBinary(); succeeded
Detoured LoadTextureFile(); succeeded
Init: D3D9.DLL queried.
Init: D3D9.DLL loaded.
Init: Took over Direct3DCreate9.
OD3D9: Driver queried from 0x00c676d7
OD3D9: Driver 0x03b48e58 constructed from 0x00c67643 (1 drivers available)
OD3D9: Driver 0x03b48e58 destructed from 0x00c6d7c5 (0 drivers left)
OD3D9: Driver queried from 0x00c676b8
OD3D9: Driver 0x03b48e58 constructed from 0x00c67643 (1 drivers available)
OD3D9: Device queried from 0x0076a547
OD3D9: Device 0x0398d870 constructed from 0x00c6d8bb (1 devices available)
Loading texture (data\textures\shaders/unbound.dds)
Pre Hook
RESZ not supported.
Depth buffer texture (INTZ) (1366,768) created OK.
Depth buffer attached OK. 0
Init: NVCPL.dll queried.
Loading texture (data\textures\effects\water_NRM_LOD.dds)
Loading texture (data\textures\effects\water_NRM_LOD.dds)
Linking to existing texture.
Loading texture (data\textures\effects\water_NRM.dds)
Loading texture (data\textures\effects\water_NRM.dds)
Linking to existing texture.
Received load game message.
Loading a game.
Creating effect vertex buffers.
Creating full screen textures.
Width = 1366, Height = 768
Format = A8R8G8B8
Loading the effects.
Shader compiling messages occured in data\shaders\LightShafts_PCS.fx:
includes/Sun.hlsl(137,58): warning X3206: implicit truncation of vector type
C:\GAMES\memory(104,33): warning X3206: 'mul': implicit truncation of vector type
C:\GAMES\memory(104,21): warning X3206: implicit truncation of vector type
C:\GAMES\memory(114,2): warning X3206: implicit truncation of vector type
C:\GAMES\memory(234,9): warning X3206: implicit truncation of vector type
C:\GAMES\memory(277,40): error X3004: undeclared identifier 'EFFECTCOND_ACHANNEL'
C:\GAMES\memory(277,6): error X3012: 'conditions': missing value

Added to list OK.
Loading the effects.
Loading effect that already exists. Returning index of existing effect.
Loading effect that already exists. Returning index of existing effect.
Save file links 3 textures.
Error loading texture list: too small.
No effect data in save file.
Effect (Godrays.fx) - Script refID = 9000800  
Loading effect that already exists. Returning index of existing effect.
Effect (Water.fx) - Script refID = 4000ed5  
Found filename : effects\water_NRM_LOD.dds
Loading texture (data\textures\effects\water_NRM_LOD.dds)
Linking to existing texture.
Received save game message.
Saving a game.
EffectManager::SaveGame
EffectManager::SaveGame
pEffect index = 3
pEffect data\shaders\Water.fx has 25 parameters.
Found float: name - causticsStrength, size - 1, data[0] - 0.400000
Found float: name - waveWidth, size - 1, data[0] - 1.000000
Found float: name - waveSpeed, size - 1, data[0] - 0.800000
Found float: name - turbidity, size - 1, data[0] - 0.650000
Found float: name - inScattCoeff, size - 1, data[0] - 0.120000
Found float: name - inExtCoeff, size - 1, data[0] - 0.400000
Found float: name - depthDarkness, size - 1, data[0] - 0.100000
Found float: name - waterHeight, size - 1, data[0] - 0.000000
Found float: name - sunColor, size - 1, data[0] - 1.000000
Found float: name - fogStart, size - 1, data[0] - 4096.000000
Found float: name - fogEnd, size - 1, data[0] - 170000.000000
Found float: name - fogColor, size - 1, data[0] - 0.390000
Found float: name - oblv_WorldTransform_MAINPASS, size - 1, data[0] - 0.000000
Found float: name - oblv_ViewTransform_MAINPASS, size - 1, data[0] - 0.000000
Found float: name - oblv_ProjectionTransform_MAINPASS, size - 1, data[0] - 0.000000
Found float: name - oblv_SunDirection, size - 1, data[0] - 0.000000
Found float: name - rcpres, size - 1, data[0] - 0.000000
Found float: name - obge_Tick, size - 1, data[0] - 0.000000
pEffect data\shaders\Godrays.fx has 34 parameters.
Found float: name - globalmul, size - 1, data[0] - 5.000000
Found float: name - morningshaftex, size - 1, data[0] - 2.300000
Found float: name - eveningshaftex, size - 1, data[0] - 3.500000
Found float: name - goldendecay, size - 1, data[0] - 0.990000
Found float: name - noonshaftex, size - 1, data[0] - 1.000000
Found float: name - noondecay, size - 1, data[0] - 0.990000
Found float: name - moonshaftex, size - 1, data[0] - 0.090000
Found float: name - moondecay, size - 1, data[0] - 0.880000
Found float: name - showraypass, size - 1, data[0] - 0.000000
Found float: name - scale, size - 1, data[0] - 2.000000
Found float: name - startsunrise, size - 1, data[0] - 4.000000
Found float: name - endsunrise, size - 1, data[0] - 10.000000
Found float: name - startevening, size - 1, data[0] - 17.000000
Found float: name - endevening, size - 1, data[0] - 21.000000
Found float: name - Density, size - 1, data[0] - 0.500000
Found float: name - Weight, size - 1, data[0] - 0.250000
Found float: name - goldensaturate, size - 1, data[0] - 0.540000
Found float: name - noonsaturate, size - 1, data[0] - 0.010000
Found float: name - Luminance, size - 1, data[0] - 0.440000
Found float: name - fMiddleGray, size - 1, data[0] - 0.990000
Found float: name - fWhiteCutoff, size - 1, data[0] - 0.400000
Found float: name - oblv_ViewTransform_MAINPASS, size - 1, data[0] - 0.639081
Found float: name - oblv_CameraForward_MAINPASS, size - 1, data[0] - -0.759510
Found float: name - oblv_SunDirection, size - 1, data[0] - -1.#IND00
Found float: name - rcpres, size - 1, data[0] - 0.000732
Found float: name - f4Time, size - 1, data[0] - 60376.000000
Found float: name - t, size - 1, data[0] - 0.767327
Found float: name - oblv_ProjectionTransform_MAINPASS, size - 1, data[0] - 0.976942
Received ExitGame message.
Calling Release Device
Releasing effect vertex buffer.
Depth buffer : Lost device callback.
Releasing the depth buffer surface.
Releasing the depth buffer texture.

don't know if it can help:

------------------
System Information
------------------
Time of this report: 6/24/2014, 22:50:04
   Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.140303-2144)
           Language: Italian (Regional Setting: Italian)
System Manufacturer: Acer
       System Model: Aspire 5750G
               BIOS: InsydeH2O Version V1.07
          Processor: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz (4 CPUs), ~2.3GHz
             Memory: 3948MB RAM
Available OS Memory: 3948MB RAM
          Page File: 2733MB used, 5159MB available
    DirectX Version: DirectX 11
DX Setup Parameters: Not found
   User DPI Setting: Using System DPI
 System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
     DxDiag Version: 6.01.7601.17514 32bit Unicode

------------
DxDiag Notes
------------
      Display Tab 1: No problems found.
        Sound Tab 1: No problems found.
          Input Tab: No problems found.

--------------------
DirectX Debug Levels
--------------------
Direct3D:    0/4 (retail)
DirectDraw:  0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay:  0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow:  0/6 (retail)

---------------
Display Devices
---------------
          Card name: Intel(R) HD Graphics Family
       Manufacturer: Intel Corporation
          Chip type: Intel(R) HD Graphics Family
           DAC type: Internal
     Display Memory: 1760 MB
   Dedicated Memory: 128 MB
      Shared Memory: 1632 MB
       Current Mode: 1366 x 768 (32 bit) (60Hz)
       Monitor Name: Monitor generico Plug and Play
      Monitor Model: unknown
         Monitor Id: LGD0250
        Native Mode: 1366 x 768(p) (59.973Hz)
        Output Type: Internal
        Driver Name: igdumd64.dll,igd10umd64.dll,igd10umd64.dll,igdumdx32,igd10umd32,igd10umd32
Driver File Version: 8.15.0010.2342 (English)
     Driver Version: 8.15.10.2342
        DDI Version: 10.1
       Driver Model: WDDM 1.1
  Driver Attributes: Final Retail
   Driver Date/Size: 10/30/2012 17:15:20, 7473664 bytes
        WHQL Logo'd: n/a
    WHQL Date Stamp: n/a
          Vendor ID: 0x8086
          Device ID: 0x0116
          SubSys ID: 0x05041025
        Revision ID: 0x0009
 Driver Strong Name: oem37.inf:Intel.Mfg.NTamd64:iSNBM0:8.15.10.2342:pci\ven_8086&dev_0116&subsys_05041025
     Rank Of Driver: 00E60001
        Video Accel: ModeMPEG2_A ModeMPEG2_C ModeWMV9_C ModeVC1_C
       D3D9 Overlay: Supported
            DXVA-HD: Supported
       DDraw Status: Enabled
         D3D Status: Enabled
         AGP Status: Enabled


#1652
claustromaniac

claustromaniac

    Fan

  • Members
  • PipPipPip
  • 351 posts

1) crash to desktop if I don't have, in the folder with the shaders, a bounch of "shaderpackageXXX.sdp" (XXX = 001 ... 019), and I don't know why, since the archive of OBGEv3 and related effects plugin don't provide them. Me neither know how I manage to get them in a remote past and currently I don't know where to find them again.

Those are no less than the vanilla shader packages :tongue: not having those is almost the same as not having the Oblivion.exe. The game simply cannot work without them. You would normally need to reinstall the game to get them back, but thankfully one user was kind enough to upload them to the Nexus. You can download them here.

Edited by claustromaniac, 25 June 2014 - 02:51 AM.


#1653
nery89

nery89

    Regular

  • Members
  • PipPip
  • 88 posts

true... I figured out later googling that the shaderpackages weren't related to OBGE installation but are native of oblivion... I felt like an idiot...

 

BUT the primary problem is still there... why I have Lightshaft_PCS.fx not working? I'm so curios to see that effect in action!

 

here the code i get from the nexus archive, which is strangely different from the one showed in obge.paradise. but neither that is working.

/* Light-shafts
 * by Ethatron
 *
 * based on Godrays from vtastek
 * which was based on the GPU-Gems implementation
 *
 * works only in conjunction with the physical sky
 */

// ---------------------------------------
// TWEAKABLE VARIABLES.


// Number of ray-marching steps for sunshafts
#define NUM_SAMPLES 16	//64

// decrease to gain performance
// but keep in mind effect will start to break
// revealing the squarish nature of the lightshafts
// so increasing would be a better idea
// but at the exchange of performance

// Exposure (intensity) values for sunshafts
static const float Strength = 1.0;

// ray density
static const float Density = 1.0;
// actual ray visibility
static const float Weight = 1.0;


// END OF TWEAKABLE VARIABLES.
// ---------------------------------------


// Oblivion globals
#define	f4SunDir	oblv_SunDirection
#include "includes/Sun.hlsl"


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


#include "includes/Random.hlsl"
#include "includes/Depth.hlsl"
#define	irangeZ	-oblv_ProjectionDepthRange_MAINPASS.z

#define	rcpres		oblv_ReciprocalResolution_MAINPASS
#define	raspect		(1.0 / oblv_ReciprocalResolution_MAINPASS.z)
// .x - 1 / width
// .y - 1 / height
// .z - width / height
// .w - width * height
float4 oblv_ReciprocalResolution_MAINPASS;

#define	fov	oblv_ProjectionFoV_MAINPASS.z
// .x - fovX
// .y - fovY
// .z - fovX deg
// .w - fovY deg
float4 oblv_ProjectionFoV_MAINPASS;

// shader codes begin here

texture obge_LastRendertarget0_EFFECTPASS;
texture obge_PrevRendertarget0_EFFECTPASS;

sampler PassSampler = sampler_state {
	texture = <obge_LastRendertarget0_EFFECTPASS>;

	AddressU = CLAMP;
	AddressV = CLAMP;

	MINFILTER = LINEAR;
	MAGFILTER = LINEAR;
	MIPFILTER = NONE;
};

sampler FrmeSampler = sampler_state {
	texture = <obge_PrevRendertarget0_EFFECTPASS>;

	AddressU = CLAMP;
	AddressV = CLAMP;

	MINFILTER = LINEAR;
	MAGFILTER = LINEAR;
	MIPFILTER = NONE;
};

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

matrix m44view;
float3 f3EyeForward;
float4 f4Time;

static const float3 eyef = f3EyeForward;

static float t = tan(radians(fov * 0.5));
static const float3 sd = -f4SunDir.xyz;
static const float3 sp = float3(0,0,0) + (f4SunDir.xyz * 999999);

static const float2 texproj = 0.5 * float2(1, -oblv_ReciprocalResolution_MAINPASS.z) / t;
static const float d = dot(f3EyeForward, sp);
static const float3 sunview_v = mul(sp / d, m44view);
static const float2 sunview = float2(0.5, 0.5) + sunview_v.xy * texproj;

// the golden code
static const float forward = dot(sd, eyef);
static const float below = dot(sd, float3(0, 0, 1));

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

float GatherColor(in float2 coord : TEXCOORD0) {
	return normalize(tex2D(FrmeSampler, coord)) * 1.5;
}

struct VSIN
{
	float4 vertPos : POSITION0;
	float2 UVCoord : TEXCOORD0;
};

struct VSOUT
{
	float4 vertPos : POSITION;
	float2 UVCoord : TEXCOORD0;
};

struct VSOUTs
{
	float4 vertPos  : POSITION;
	float2 UVCoord  : TEXCOORD0;
	float3 sunColor : TEXCOORD1;
};

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

	OUT.vertPos = IN.vertPos;
	OUT.UVCoord = IN.UVCoord;

	return OUT;
}

VSOUTs SunVS(VSIN IN)
{
	VSOUTs OUT = (VSOUTs)0.0f;	// initialize to zero, avoid complaints.

	OUT.vertPos = IN.vertPos;
	OUT.UVCoord = IN.UVCoord;
	OUT.sunColor = SunColor();

	return OUT;
}

float4 DepthSkyMask(VSOUT IN) : COLOR0
{
	float dep = LinearDepth(IN.UVCoord);
	float msk = step(0.99, dep);

	return float4(dep, msk, 0, 0);
}

float4 Lightshafts(VSOUT IN) : COLOR0
{
	// this is a vector!!!
	float2 DeltaTexCoord = (IN.UVCoord - sunview.xy);

	// vertically, we need to adjust it according to Aspect Ratio
	float screendist = length(DeltaTexCoord * float2(1, raspect));

	DeltaTexCoord /= screendist;

	// sun is not a point
	float sunr = min(0.3, screendist);

	DeltaTexCoord = DeltaTexCoord * 0.5 * sunr * Density * (1.0 / NUM_SAMPLES);
	if (forward >= 0)
		DeltaTexCoord = -DeltaTexCoord;

	float2 dm = tex2D(PassSampler, IN.UVCoord).xy;
	float dep = dm.x;
	float msk = dm.y;
	float val = msk;
	float dec = screendist;
	float IlluminationDecay = 1.0;

	float2 samplepos = IN.UVCoord;
	float2 sampleshf;

	[loop]
	for (int i = 0; i < NUM_SAMPLES; ++i)	{
		/* ray-marching a constant step */
		samplepos -= DeltaTexCoord;
		/* randomize marching-direction */
		sampleshf = DeltaTexCoord * rand_1_05(samplepos);

		float Sample = tex2D(PassSampler, samplepos - sampleshf).r;

		Sample *= IlluminationDecay * Weight;
//		Sample *= IlluminationDecay * Weight * (1.0 / (1.0 + i));
//		Sample *= IlluminationDecay * Weight / sqrt(1 + i);

		val += Sample;

//		IlluminationDecay *= IN.satdecexpo.y;
	}

	val *= Strength / NUM_SAMPLES;

	return float4(dep, msk, val, dec);
}

//blurt from phal's sunshaft shader
float4 BlurShafts(float2 Tex : TEXCOORD0) : COLOR0
{
	float2 tangent = 1.0 * normalize(Tex - sunview).yx * float2(rcpres.y, -rcpres.x);
	float4

	val    =        tex2D   (PassSampler,        Tex                     ).rgba;
	val.b += 0.67 * tex2Dlod(PassSampler, float4(Tex + 1 * tangent, 0, 1)).b;
	val.b += 0.57 * tex2Dlod(PassSampler, float4(Tex + 2 * tangent, 0, 1)).b;
	val.b += 0.43 * tex2Dlod(PassSampler, float4(Tex + 3 * tangent, 0, 2)).b;
	val.b += 0.33 * tex2Dlod(PassSampler, float4(Tex + 4 * tangent, 0, 2)).b;
	val.b *= 0.333f;

	return val;
}

float4 SunCombine(VSOUTs IN) : COLOR0
{
	float3 BlkColor = float3(0, 0, 0);
	float3 Screen   = tex2D(FrmeSampler, IN.UVCoord);
	float4 Shaft    = tex2D(PassSampler, IN.UVCoord);
	float3 ScreenO;
	float  DecayHyp = saturate(1.0 / (10 * pow(Shaft.a, 0.5)));
	float  DecayLnr = saturate(1.0 / Shaft.a) / 4 * saturate(-below * 2);

	/* TODO: sun turns off hard when reaching the horizont */
	float3 sunColor = /*Shaft.g **/ pow(IN.sunColor / 200, DecayHyp);
//	float3 SunColor = normalize(tex2D(FrmeSampler, sunview.xy)) * 1.5;
//	float3 SunColor = lerp(cust_SunColor, normalize(tex2D(FrmeSampler, sunview.xy)) * 1.5, 0.5);

//	return float4(sunColor, 1) / 200;
//	return Shaft.b;
//	return min(Shaft.a, Shaft.g) * Shaft.b;
//	return pow(Shaft.a * Shaft.b, 0.25);

	if (below > 0.1)
		return float4(Screen.rgb, 1);

//	if (Shaft.g)
//		ScreenO = lerp(Screen.rgb, BlkColor, saturate(-0.83 + exp(-0.2 * Shaft.b)));
//	else
//		ScreenO = lerp(Screen.rgb, sunColor, saturate( 1.00 - exp(-0.2 * Shaft.b)));

//	if (Shaft.g)
//		ScreenO = lerp(Screen.rgb, BlkColor, saturate(-0.83 + exp(-0.07 * Shaft.b)));
//	else
//		ScreenO = lerp(Screen.rgb, sunColor, saturate( 1.00 - exp(-0.07 * Shaft.b)));

	if (Shaft.g)
		ScreenO = lerp(Screen.rgb, BlkColor, saturate((1.0 - Shaft.b) * DecayLnr));
	else if (forward < 0)
		ScreenO = lerp(Screen.rgb, sunColor, saturate(   Shaft.b      * DecayHyp));
	else
		ScreenO = Screen.rgb;

	return float4(ScreenO, 1);
}

technique t0
<
	int group = EFFECTGROUP_MAIN;
	int fxclass = EFFECTCLASS_LIGHT;
	int conditions = EFFECTCOND_ZBUFFER | EFFECTCOND_ACHANNEL /*| EFFECTCOND_HASSUN*/;
>
{
	pass {
		VertexShader = compile vs_3_0 FrameVS();
		PixelShader  = compile ps_3_0 DepthSkyMask();
	}

	pass {
		VertexShader = compile vs_3_0 FrameVS();
		Pixelshader  = compile ps_3_0 Lightshafts();
	}

	pass {
		VertexShader = compile vs_3_0 FrameVS();
		Pixelshader  = compile ps_3_0 BlurShafts();
	}

	pass {
		VertexShader = compile vs_3_0 SunVS();
		Pixelshader  = compile ps_3_0 SunCombine();
	}
}

and the sun.hlsl which seems to have problem with "truncation of vector type"

/* ############################################################################# */

/* Light properties */
float4 oblv_SunDirection;
float4 oblv_SunTiming;
float4 oblv_PlayerPosition;

texture2D cust_texSun < string filename = "sky/pcs/Sun_025k.dds"; >;
sampler2D cust_samplerSun = sampler_state
{
    Texture = <cust_texSun>;

    AddressU  = CLAMP;
    AddressV  = CLAMP;
    AddressW  = CLAMP;

    MIPFILTER = LINEAR;
    MINFILTER = LINEAR;
    MAGFILTER = LINEAR;
};

texture2D cust_texOpticalDepth < string filename = "sky/pcs/OptDpta_2D.dds"; >;
sampler2D cust_samplerOpticalDepth = sampler_state
{
    Texture = <cust_texOpticalDepth>;

    AddressU  = CLAMP;
    AddressV  = CLAMP;

    MIPFILTER = LINEAR;
    MINFILTER = LINEAR;
    MAGFILTER = LINEAR;

    Bordercolor = 0.0f;
};

/* ############################################################################# */

static const float3 cust_SunIntensity = float3(1.0, 0.960784, 0.949019);

#define	VARYING_EFFICIENTS
#define	SUNRSE_IndRay	1.5000
#define	MIDDAY_IndRay	1.0000
#define	SUNSET_IndRay	2.5000
#define	SUNRSE_IndMie	4.0000
#define	MIDDAY_IndMie	1.0000
#define	SUNSET_IndMie	0.5000
#define	SUNRSE_MieCSB	0.0085
#define	MIDDAY_MieCSB	0.0025
#define	SUNSET_MieCSB	0.0015

/* ############################################################################# */

inline float get_height_coefficient(float3 Eye, float fPlanetRadius, float fAtmosphereRadius)
{
	float r = length(Eye);
	return
		sqrt(                r * r                 - fPlanetRadius * fPlanetRadius) /
		sqrt(fAtmosphereRadius * fAtmosphereRadius - fPlanetRadius * fPlanetRadius);
}

float3 SunColor() {

	float3 L = -oblv_SunDirection.xyz;

    /* scattering shader ------------------------------------- */

	float cust_fIndRay    = MIDDAY_IndRay;
	float cust_fIndMie    = MIDDAY_IndMie;
	float cust_fMieCoefSB = MIDDAY_MieCSB;

#ifdef	VARYING_EFFICIENTS
	/*  morning:   1.5, 4.0, 0.0085
	 *  noon:      1.0, 1.0, 0.0025
	 *  afternoon: 2.0, 0.5, 0.0015
	 */
	float3 T = normalize(float3(-L.x, 0, -L.z));
	float noon = T.z;//saturate(dot(float3(0, 0, 1), T));

	if (T.x < 0) {
		cust_fIndRay    = lerp(SUNSET_IndRay, cust_fIndRay, noon);
		cust_fIndMie    = lerp(SUNSET_IndMie, cust_fIndMie, noon);
		cust_fMieCoefSB = lerp(SUNSET_MieCSB, cust_fMieCoefSB, noon);
	}
	else {
		cust_fIndRay    = lerp(SUNRSE_IndRay, cust_fIndRay, noon);
		cust_fIndMie    = lerp(SUNRSE_IndMie, cust_fIndMie, noon);
		cust_fMieCoefSB = lerp(SUNRSE_MieCSB, cust_fMieCoefSB, noon);
	}
#endif

    /* sun color ----------------------------------------------------------- */

	/* A&P dimensions */
	const float fAtmosphereRadius = 6432797.0;
	const float fPlanetRadius = 6372797.0;
	const float fThicknessInv = 1.0 / (60000);

//efine	SUN_SIZE	(1024 - (256 * pow(1.0 - L.z, 0.125)))
#define	SUN_SIZE	(1024)
#define	SUN_BRIGHTNESS	(400)
#define	PLAYER_HEIGHT	oblv_PlayerPosition.z

	/* we normally should put the real player-position here (from where?)
	 *
	 * additionally, the reflections' pass camera is below surface, we could
	 * intersect the view-vector with the planet's surface to get an individual
	 * view-vector per pixel, though I don't know if the few hundret meters we
	 * can go around really affect the sky's appearance
	 *
	 * for the moment we neglect any variable position of the camera
	 */
	float3 Eye = float3(0.0, 0.0, fPlanetRadius + max(PLAYER_HEIGHT, 0));	// Eye is 0km up in global
//	float3 L = -oblv_SunDirection.xyz;

	// new parameterization
	// if we are directly on the planet-surface this is 0 and 1 for above atmosphere
	// range [0.0, 1.0] or more
	float height = get_height_coefficient(Eye, fPlanetRadius, fAtmosphereRadius);

	/* eye-normal */
	float3 nEye = normalize(Eye);

	/* zenith:   dot([0,0,1], [0,0,-1]) = -1 = 0.0
	 * horizont: dot([0,0,1], [0,-1,0]) =  0 = 0.5
	 */
	float4 tl = tex2Dlod(cust_samplerOpticalDepth, float4(height, 0.5f * (dot(nEye, L)) + 0.5f, 0, 0));

	float4 cust_SunColor = tex2Dlod(cust_samplerSun, float4(0.5, (dot(L, L) - 1.0) * SUN_SIZE + 0.5, 0, 0));

	float3 sunIntensityAtt = float3(1,1,1) * exp(
		-cust_fIndRay * tl.xyz
		-cust_fIndMie * tl.aaa
	);

        float3 sunColor = SUN_BRIGHTNESS * cust_SunColor * sunIntensityAtt;

        return sunColor;
}

If I was able to code I would help, but I'm not familiar with shader by microsoft. help!!!  :laugh:


Edited by nery89, 25 June 2014 - 08:02 AM.


#1654
claustromaniac

claustromaniac

    Fan

  • Members
  • PipPipPip
  • 351 posts
In response to post #15918045.

Light shafts only works in conjunction with PCS. If you don't have it already, you can download the executable installer here or the BAIN installer here.

The non-PCS version of that effect is called Godrays and you can find it here.

By default when you install OBGE those effects get installed as well, so you shouldn't really need to borrow the code and manually create the .fx files yourself. If you made a custom install I suggest you simply reinstall OBGE with the default settings.

Make sure the bUseEffectList parameter in the OBGE.ini file located in Documents/My Games/Oblivion is set to 1 like this:

bUseEffectList=1

Then open the shaderlist.txt file in the Data/shaders/ folder and set LightShafts_PCS.fx to 1 (or Godrays06.fx if you don't want to use PCS). Like this:

LightShafts_PCS.fx=1

I hope that helps.

Edited by claustromaniac, 25 June 2014 - 09:04 AM.


#1655
nery89

nery89

    Regular

  • Members
  • PipPip
  • 88 posts

 

In response to post #15918045.
 
Light shafts only works in conjunction with PCS. If you don't have it already, you can download the executable installer here or the BAIN installer here.

The non-PCS version of that effect is called Godrays and you can find it here.

By default when you install OBGE those effects get installed as well, so you shouldn't really need to borrow the code and manually create the .fx files yourself. If you made a custom install I suggest you simply reinstall OBGE with the default settings.

Make sure the bUseEffectList parameter in the OBGE.ini file located in Documents/My Games/Oblivion is set to 1 like this:

bUseEffectList=1

Then open the shaderlist.txt file in the Data/shaders/ folder and set LightShafts_PCS.fx to 1 (or Godrays06.fx if you don't want to use PCS). Like this:

LightShafts_PCS.fx=1

I hope that helps.

 

nope, pcs is installed!

 

i make some try and this what i found:

there's a backup file named lightshaft_PCS.fx.bak. I used the content into the original fx.

the error ogbe log show was some double defined variables, so i commented in the sun.hlsl this variables

float4 oblv_SunDirection;
float4 oblv_SunTiming;
float4 oblv_PlayerPosition;

now it work perfectly, but this escamotage doesn't prevent me to say that the original lightshaft_PCS.fx is someway broken.



#1656
claustromaniac

claustromaniac

    Fan

  • Members
  • PipPipPip
  • 351 posts
In response to post #15919120.

Possible. As far as I know Lightshafts is not nearly as popular as its non-PCS counterpart so I wouldn't be surprised if it wasn't fully neat and tidy.

Anyway, it's good to know that you managed to set it straight :)

#1657
7fferaser

7fferaser

    Stranger

  • Members
  • Pip
  • 5 posts
hallo zusammen
ich habe ein problem und zwar wenn ich das spiel starte mit obse nachdem ich die obge dateien entpackt habe, sehe ich im titelmenü keine schrift und keine maus. wenn ich mit der tastatur das spiel lade sehe ich nichts,wie wenn ich mit dem cheat tcl unter dem boden wäre. Zudem erstellt sich keine obge.ini datei warum auch immer :/ Dokumente/Mygames/oblivion , da sollte diese konfig datei sein ist sie aber nicht. kann mir einer da behilflich sein?

hello together
I have a problem and that when I start the game with obse after I unpacked the obge files, I see in the title menu no signature and no mouse. when I load the game with the keyboard, I see nothing, as if I would cheat tcl under the floor with the. In addition, no obge.ini file created for whatever reason :/ Documents / myGames / oblivion, as they should be config file but it is not. may be someone help me?

sry for my bad english i hope u understand it what i want :/




#1658
Paenumbra

Paenumbra

    Journeyman

  • Members
  • Pip
  • 30 posts
I have installed this twice, and uninstalled this twice.

It crashes on start up, even though everything is in the right places.

#1659
claustromaniac

claustromaniac

    Fan

  • Members
  • PipPipPip
  • 351 posts
In response to post #16464659.

Some details wouldn't hurt :) If you are missing something or making any mistakes it wont work no matter how many times you reinstall it.

Have you checked this out?

#1660
astrob0y

astrob0y

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,893 posts
In response to post #16464659. #16465054 is also a reply to the same post.

This setup is what Im using (OBGE 3.1, POM, Stand alone effects and Liquid water): https://drive.google.com/file/d/0Bz8uKxChR4Ecb2hvUXNxdF9JbDg/edit?usp=sharing
And if an OBGE.ini isnt made in your /mygames/oblivion please use this .ini: https://drive.google.com/file/d/0Bz8uKxChR4EcSkV1bUpSR1RFVjg/edit?usp=sharing

Hope it helped

Edited by astrob0y, 12 July 2014 - 08:34 PM.





Page loaded in: 1.029 seconds