Quote:


Is there any chance to get rid off the SetLightMatrices.dll...
set the matrices somehow in c-script and still being able to use this shadow method in A7??




It is all written in Lite-C and I wasn´t able to get the functionality of the dll in Lite-C...

I am going to release the full code when everything works fine.
I thought about selling it but a sponsor call is probably a good idea


Quote:


It looks awesome, shadows are still sharp but very promising!




I know how to blur them more but had some wierd problems when trying that yesterday,
but I will look into it more deeply very soon.

Quote:


Also, this SetLightMatrices DLL - did you make this?
I am guessing it generates the view matrix or something similar for the light,
is there any chance you will release how to use it and if we can use it




I created that DLL. I need it to pass more than one custom matrix to shaders.
It is actually very simple but I plan to expand it to help me with some other stuff as well
You can use it for everything you want to.
You have to use it like that:
-Put the dll in your plugindir.
-Place these lines on top of your scripts:
Code:

dllfunction SetCustomMatrix(char *Name, float *Matrix); //passes a custom matrix to a shader
dllfunction SetCustomVector(char *Name, float *Vector); //passes a custom matrix to a shader


-Call the function you want to use in the event of the material you want to pass the matrix to:
Code:

SetCustomMatrix("MatName", ArrayWith16Values);
SetCustomVector("VecName", ArrayWith4Values);


-You can than acces the Vector and the Matrix in the Shader like this:
Code:

float4x4 MatName;
float4 VecName;



This is the sourcecode of the dll:
Code:

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <math.h.>

// engine specific header file
#define DLL_USE // always define before including adll.h
#include "adll.h"
#include <d3dx9.h>

// DLL main entry point - normally this needs not to be changed
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
// make sure the library is linked
engine_bind();
return TRUE;
}

LPD3DXEFFECT *A7_eff;

DLLFUNC void SetCustomMatrix(char *Name, float *Matrix)
{
D3DXMATRIX matCustom = (D3DXMATRIX)Matrix;

A7_eff = (LPD3DXEFFECT*)ev->render_d3dxeffect;
if(A7_eff)
{
LPD3DXEFFECT(A7_eff)->SetMatrix(Name,&matCustom);
}
}

DLLFUNC void SetCustomVector(char *Name, float *Vector)
{
D3DXVECTOR4 vecCustom = (D3DXVECTOR4)Vector;

A7_eff = (LPD3DXEFFECT*)ev->render_d3dxeffect;
if(A7_eff)
{
LPD3DXEFFECT(A7_eff)->SetVector(Name,&vecCustom);
}
}



The problem for the errors is that this dll doesn´t get loaded on many computers (it works fine on my computer...)... -_-

Here is a short clip of the shadows until I solve the problem with the dll:
http://www.youtube.com/watch?v=JL8NIaTpGTo

Thanks for all those comments

If I get the problems fixed, added pointlights, blur and support for more lights and have it all easy to use, how much would you be willing to pay for it?
single choice
Votes accepted starting: 01/05/08 00:52
You must vote before you can view the results of this poll.