Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (fogman, Grant, AndrewAMD, juanex), 989 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Glow Shader (From Wiki) #65815
03/08/06 14:59
03/08/06 14:59
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan


I'm having trouble with Matt Aufderheide' glow shader posted in the Wiki.

I'm not new to shaders, but I don't know why this one won't work. I saved it as a .fx file and included the usual material definition plus set a model to that material. However, I get:

Error in efect; glowmodel ID3DXEffectCompiler: There were no techniques


What could that be? Obivously it found the file, and the material definition points to it. I'm stumped.

Re: Glow Shader (From Wiki) [Re: A.Russell] #65816
03/08/06 16:07
03/08/06 16:07
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
You must have did something wrong, recheck that you copied everything. The fx worked for me.. but looked really strange.

Re: Glow Shader (From Wiki) [Re: Alexander Esslinger] #65817
03/08/06 16:36
03/08/06 16:36
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
This isnt my shader really, its been modified by someone else.. so i have no idea what the problem is.


Sphere Engine--the premier A6 graphics plugin.
Re: Glow Shader (From Wiki) [Re: Matt_Aufderheide] #65818
03/08/06 20:46
03/08/06 20:46
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
huh whatīs wrong with it? i really know it works... using it in many of my levels. as alexander esslinger said, check if you copied everything. if you donīt succeed, just post everything you got here.

Re: Glow Shader (From Wiki) [Re: broozar] #65819
03/09/06 03:58
03/09/06 03:58
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan


Okay, here's what I've got.

In the .fx file, a copy and paste of the shader script:

Code:

//////////////////////////////////////////////
//multipass shader for volumetric glow for models
/////////////////////////////////////////////////
//by matt_aufderheide
//ps 1.1 vs 1.1

texture entSkin1; //model skin
texture entSkin2;//entskin2 is the glow map.. make it a very dark solid color
matrix matWorldViewProj;
matrix matWorld;
matrix matWorldView;
vector vecSkill1;
vector vecSkill41;
vector vecFog;
vector vecSunDir;

technique glow
{
pass p0
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=false;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>; // shell_distance, 0, fur_u_scale, fur_v_scale
vertexShaderConstant[17]={0.0,0.0,0.0,0.0}; // shell_number
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>; // first_shell_brightness, brightness_increment, 0, 0
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

.......
Shortened
.......

mov r0,t0

};
}

pass p21 //this pass renders the model without the glow, so only the edgdes will glow..
{
texture[0]=<entSkin2>;


zWriteEnable=true;
alphaBlendEnable=false;
zenable=true;

Texture[0]=<entSkin1>;

ColorArg1[0]=Texture;
ColorOp[0]=Modulate;
ColorArg2[0]=Diffuse;


}
}



//in your main script

//material glowmodel
//{
// effect="glow.fx";
//}

//action anymodel{
// my.material=glowmodel;
// my.skill41 = float(0.3); // adjust the stength of the glow
//}


// the glow model needs two skins, the first is the diffuse map,
// the second can be very small (e.g. 16x16) and must be very dark, almost black






Then in my main script:

Code:

material glowmodel
{
effect="glow.fx";
}

function main()
{
time_smooth = 0.666;
randomize();
.....




And in the entity function:

Code:

function player_fighter()
{
player=my;
my.alive=1;



// my.bright = on;
breakpoint();
my.material = glowmodel;
my.skill41 = float(0.6); // adjust the stength of the glow
...



What's wrong with that?

Re: Glow Shader (From Wiki) [Re: A.Russell] #65820
03/09/06 21:05
03/09/06 21:05
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
you put the "anymodel" action content into a function. dunno if this is the solution, but thatīs the only thing that is different from what i use.

action playermodel {
my.material=glowmodel;
my.skill41 = float(0.3);
player_fighter();
}

something like this should work.

Re: Glow Shader (From Wiki) [Re: broozar] #65821
03/10/06 11:45
03/10/06 11:45
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Shouldn't be. Let me check...


...No, it wasn't that.

Could someone zip up a working example for me?


Last edited by A.Russell; 03/10/06 11:48.
Re: Glow Shader (From Wiki) [Re: A.Russell] #65822
03/11/06 09:22
03/11/06 09:22
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
sure. thatīs my test level, you will need a ps/vs 2.0 graphics board for it. hope you donīt mind the stuff thatīs in the level additionally, just have a look at the cone next to the furry lion. you can alter the stength of the glow by fiddling with the alpha channel.

http://i.1asphost.com/gaardenier/test.cab

itīs a *.cab, you need winRAR or filzip or equivalent.

Re: Glow Shader (From Wiki) [Re: broozar] #65823
03/14/06 15:56
03/14/06 15:56
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
ahem... did it work for you?

Re: Glow Shader (From Wiki) [Re: broozar] #65824
03/17/06 18:36
03/17/06 18:36
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Thank you DaBroozar, that did work!

Comparing the files I found out what the problem was. This will be useful info for anyone out there with a foreign language version of Windows:

Make sure the text file is encoded as ASCII! (mine was encoded as UTF-8. This looks the same in your editor, but it will not compile)

Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1