3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Variance Shadow Mapping for the Sun
[Re: TSG_Christof]
#176336
01/04/08 10:19
01/04/08 10:19
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
I've got a crash here too when running the .exe. Even when putting the correct dlls in the map When I tried to run the compiled version, it works but no shadows appeared. Looks very promising though Thanks in progress Frazzle
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
Variance Shadow Mapping for the Sun
[Re: Mythran]
#176339
01/05/08 00:53
01/05/08 00:53
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
OP
Expert
|
OP
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
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
|
|
|
Re: Variance Shadow Mapping for the Sun
[Re: Slin]
#176340
01/05/08 01:26
01/05/08 01:26
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
Expert
|
Expert
Joined: Feb 2006
Posts: 2,185
|
i'd pay about $10-$20 but that's entirely up to you.
- aka Manslayer101
|
|
|
Re: Variance Shadow Mapping for the Sun
[Re: mpdeveloper_B]
#176341
01/05/08 10:22
01/05/08 10:22
|
Joined: Jul 2007
Posts: 103
Lutz_G
Member
|
Member
Joined: Jul 2007
Posts: 103
|
|
|
|
Re: Variance Shadow Mapping for the Sun
[Re: Lutz_G]
#176342
01/05/08 10:34
01/05/08 10:34
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
@Slin : But I wonder why we get a crash due too the dll since it doens't get loaded anywhere in the code yet ?? Btw, that isn't an easy dll Thanks in progress Frazzle
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
Re: Variance Shadow Mapping for the Sun
[Re: frazzle]
#176343
01/05/08 12:58
01/05/08 12:58
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
OP
Expert
|
OP
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
Quote:
But I wonder why we get a crash due too the dll since it doens't get loaded anywhere in the code yet ??
I use the functions of the dll. That causes the crash. 3DGS just does not load the dll on most systems but it does on some (it works perfectly on my computer-_-).
|
|
|
Re: Variance Shadow Mapping for the Sun
[Re: Slin]
#176344
01/05/08 13:15
01/05/08 13:15
|
Joined: Jan 2004
Posts: 2,013 The Netherlands
Excessus
Expert
|
Expert
Joined: Jan 2004
Posts: 2,013
The Netherlands
|
Quote:
I use the functions of the dll. That causes the crash. 3DGS just does not load the dll on most systems but it does on some (it works perfectly on my computer-_-).
Did you create the plugin with VC++? Maybe those users have to install the vcredist.exe? Or you have to distribute the libraries another way.
|
|
|
|