Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, kzhao, alibaba, 7th_zorro), 650 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 3
Page 20 of 24 1 2 18 19 20 21 22 23 24
Re: stumped [Re: Matt_Coles] #36963
08/31/05 10:31
08/31/05 10:31
Joined: Aug 2005
Posts: 107
NMS Offline
Member
NMS  Offline
Member

Joined: Aug 2005
Posts: 107
The shadercollection gives me many error messages :S

Maybe cuz i've the 6.1 engine no?
I cant update, the downloads appear like broken in my browser.


http://www.coniserver.net/ubbthreads/showflat.php?Cat=0&Number=560847&an=0&page=0#560847 Cmon every one! Help me building this camera script! The first of its kind in 3dgs! Thnkx to everyone who helped me in my questions
Re: stumped [Re: NMS] #36964
08/31/05 22:46
08/31/05 22:46
Joined: Jul 2003
Posts: 893
Melbourne, Australia
Matt_Coles Offline

User
Matt_Coles  Offline

User

Joined: Jul 2003
Posts: 893
Melbourne, Australia
Yeah you need A6.31.4 as it is direct x 9. Have you tried downloading the update from the downloads page?

Re: stumped [Re: Matt_Coles] #36965
09/01/05 13:41
09/01/05 13:41
Joined: Aug 2005
Posts: 107
NMS Offline
Member
NMS  Offline
Member

Joined: Aug 2005
Posts: 107
yes but my mozzila doesnt work with download links anymore, he says "links broken", and my internet explorer doenst exists anymore... i have to format this xit...

can someone send me the update? plz...


http://www.coniserver.net/ubbthreads/showflat.php?Cat=0&Number=560847&an=0&page=0#560847 Cmon every one! Help me building this camera script! The first of its kind in 3dgs! Thnkx to everyone who helped me in my questions
Re: stumped [Re: NMS] #36966
09/03/05 22:24
09/03/05 22:24
Joined: Nov 2003
Posts: 523
Whitehorse, Yukon, Canada
Paul_L_Ming Offline
User
Paul_L_Ming  Offline
User

Joined: Nov 2003
Posts: 523
Whitehorse, Yukon, Canada
Hiya.

Try opening up "My Computer", then in the "Address" bar type in the URL of the download? If that doesn't work, they your OS shouldn't even be running. I guess you've tried uninstalling Firefox, restarting, re-installing Firefox? What about updating IE? If you have, then you should just go and reformat your hard drive and get back to work...if you're having this much trouble from a simple URL, it will only get worse for your other programs I'm sure. Good luck!


^_^

"We've got a blind date with destiny...and it looks like she's ordered the lobster."

-- The Shoveler

A7 Commercial (on Windows 7, 64-bit)
Re: stumped [Re: Paul_L_Ming] #36967
11/28/05 15:56
11/28/05 15:56
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
I have a ati 9600 all in wonder. I am using Gamestudio Comercial v.6.31.4 and I have dx9.0c on my comp. I have installed the latest vid card driver files.I cannot get this working, everything "shader applied" is black. I did get steempipes bumpmapping to work off of the wiki, but this lighted shader is kicking my butt. I would love to get this working, does something need to be changed in the .fx files to work with this version of gstudio?

Re: stumped [Re: zefor] #36968
11/28/05 17:09
11/28/05 17:09
Joined: Nov 2003
Posts: 1,380
Switzerland; Zurich
S
Sebe Offline
Serious User
Sebe  Offline
Serious User
S

Joined: Nov 2003
Posts: 1,380
Switzerland; Zurich
Code:
        // compile shaders
VertexShader = compile vs_3_0 VS_PASS2();
PixelShader = compile ps_3_0 PS_PASS2();



Sadly, your card only supports shader 2.0 - and as you can see, this seem to be 3.0 - shaders.

Re: stumped [Re: Sebe] #36969
11/28/05 17:23
11/28/05 17:23
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
Yes, this shader is done using 3.0 shaders, because that saved passes.
However, it can easily be converted to 2.0 .. just make each pass do only 2 lights..and add some passes.

For instance here is the normal mapping shader form the SPhere Engine(you wont be able to use this as is, but it will show you waht to do):
Code:
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////
//normalmapping

struct VS_INPUT_STRUCT
{
half4 position: POSITION;
half3 tangent: TEXCOORD1;
half3 binormal: TEXCOORD2;
half3 normal: NORMAL;
half2 texcoord0: TEXCOORD0;
};

struct VS_OUTPUT_STRUCT
{
half4 position: POSITION;
half2 bump_map: TEXCOORD0;
half3 tangentlight: TEXCOORD1;
half3 tangenteye: TEXCOORD3;
half3 Att1 : TEXCOORD4;
half3 Att2 : TEXCOORD6;
half3 tangentlight2: TEXCOORD2;
half4 eyeLinear: TEXCOORD5;
half Fog : FOG;
};

VS_OUTPUT_STRUCT VS_PASS0( VS_INPUT_STRUCT vsInStruct )
{
VS_OUTPUT_STRUCT vsOutStruct;
vsOutStruct.Fog = 10000;
vsOutStruct.position = mul( vsInStruct.position,matWorldViewProj );
vsOutStruct.bump_map = vsInStruct.texcoord0;

// compute the 3x3 tranform matrix
// to transform from world space to tangent space
half3x3 worldToTangentSpace;
worldToTangentSpace[0] = mul(vsInStruct.tangent, matWorld);
// worldToTangentSpace[1] = mul(cross(vsInStruct.tangent, vsInStruct.normal), -matWorld);
worldToTangentSpace[1] = mul(vsInStruct.binormal, -matWorld);
worldToTangentSpace[2] = mul(vsInStruct.normal, matWorld);

half3 PosWorld = mul(vsInStruct.position, matWorld);

// Output the projective texture coordinates
vsOutStruct.eyeLinear= mul( vsInStruct.position, matTexture );

//light 1
half3 objectspace_light_vector = PosWorld - vecLightPos ;
vsOutStruct.tangentlight = mul(worldToTangentSpace, -objectspace_light_vector); // L
half3 objectspace_view_vector = PosWorld - vecViewPos;
vsOutStruct.tangenteye = mul(worldToTangentSpace, -objectspace_view_vector); // V
vsOutStruct.Att1 = objectspace_light_vector * (vecLightColor.w*0.6);

//light 2
half3 objectspace_light_vector2 = PosWorld - vecLightPos2 ;
vsOutStruct.tangentlight2 = mul(worldToTangentSpace, -objectspace_light_vector2); // L
vsOutStruct.Att2 = objectspace_light_vector2 * (vecLightColor2.w*0.6);

return vsOutStruct;
}

struct PS_INPUT_STRUCT
{
half2 bump_map: TEXCOORD0;
half3 tangentlight: TEXCOORD1;
half3 tangenteye: TEXCOORD3;
half3 Att1 : TEXCOORD4;
half3 Att2 : TEXCOORD6;
half3 tangentlight2: TEXCOORD2;
half4 eyeLinear: TEXCOORD5;
};

struct PS_OUTPUT_STRUCT
{
half4 color0: COLOR0;
};


PS_OUTPUT_STRUCT PS_PASS0( PS_INPUT_STRUCT psInStruct )
{
PS_OUTPUT_STRUCT psOutStruct;

half4 Attenuation1 = mul(psInStruct.Att1, psInStruct.Att1);
half4 Attenuation2 = mul(psInStruct.Att2, psInStruct.Att2);

half3 eyevect = normalize(psInStruct.tangenteye);

// half2 modified_texcoord = ParallaxTexCoord(psInStruct.bump_map, BumpMapSampler, eyevect, parallax);

// half4 base = tex2D( ColorMapSampler, modified_texcoord);
half4 base = tex2D( ColorMapSampler, psInStruct.bump_map);
// half3 bump = bumpheight * (tex2D(BumpMapSampler, modified_texcoord) - 0.5); // fetch bump map
half3 bump = bumpheight * (tex2D(BumpMapSampler, psInStruct.bump_map) - 0.5); // fetch bump map
// normalize(bump);

half3 LightDir1 = normalize(psInStruct.tangentlight);
half3 ViewDir1 = normalize(psInStruct.tangenteye);
half4 diff1 = saturate(dot(bump, LightDir1)); // diffuse component
half3 Reflect1 = normalize(2 * diff1 * bump - LightDir1); // R
half4 spec1 = pow(saturate(dot(Reflect1, ViewDir1)), 15);

half3 LightDir2 = normalize(psInStruct.tangentlight2);
half4 diff2 = saturate(dot(bump, LightDir2)); // diffuse component
half3 Reflect2 = normalize(2 * diff2 * bump - LightDir2); // R
half4 spec2 = pow(saturate(dot(Reflect2, ViewDir1)), 15);

// half shadow1 = saturate(4 * diff1);
// half shadow2 = saturate(4 * diff2);

half4 shadow_map =tex2Dproj(shadowmap_1, psInStruct.eyeLinear);

if (enable_shadows==0)
{
shadow_map =1;
}


half4 shadow_map1 = shadow_map.r;
half4 shadow_map2 = shadow_map.g;

psOutStruct.color0.rgb = (ambientcolor * base) + saturate((((/*shadow1*/ (base * diff1 + (spec1*base.w)) * (1-Attenuation1))*(vecLightColor)))*saturate(shadow_map1))+
saturate(((/*shadow2*/ (base * diff2 + (spec2*base.w)) * (1-Attenuation2))*(vecLightColor2))*saturate(shadow_map2));

psOutStruct.color0.a = 1.0f;

return psOutStruct;
}


///////////////////////////////////////////////////////////////////////////////////////////
struct VS_INPUT_STRUCT1
{
half4 position: POSITION;
half3 tangent: TEXCOORD1;
half3 binormal: TEXCOORD2;
half3 normal: NORMAL;
half2 texcoord0: TEXCOORD0;
};

struct VS_OUTPUT_STRUCT1
{
half4 position: POSITION;
half2 bump_map: TEXCOORD0;
half3 tangentlight: TEXCOORD1;
half3 tangentlight2:TEXCOORD2;
half3 tangenteye: TEXCOORD3;
half3 Att1 : TEXCOORD4;
half3 Att2 : TEXCOORD6;
half4 eyeLinear: TEXCOORD5;
half Fog : FOG;
};

VS_OUTPUT_STRUCT1 VS_PASS1( VS_INPUT_STRUCT1 vsInStruct )
{
VS_OUTPUT_STRUCT1 vsOutStruct;
vsOutStruct.Fog = 10000;
vsOutStruct.position = mul( vsInStruct.position,matWorldViewProj );
vsOutStruct.bump_map = vsInStruct.texcoord0;

// compute the 3x3 tranform matrix
// to transform from world space to tangent space
half3x3 worldToTangentSpace;
worldToTangentSpace[0] = mul(vsInStruct.tangent, matWorld);
// worldToTangentSpace[1] = mul(cross(vsInStruct.tangent, vsInStruct.normal), -matWorld);
worldToTangentSpace[1] = mul(vsInStruct.binormal, -matWorld);
worldToTangentSpace[2] = mul(vsInStruct.normal, matWorld);

half3 PosWorld = mul(vsInStruct.position, matWorld);

vsOutStruct.eyeLinear= mul( vsInStruct.position, matTexture );

half3 objectspace_light_vector = PosWorld - vecLightPos3 ;
vsOutStruct.tangentlight = mul(worldToTangentSpace, -objectspace_light_vector); // L
half3 objectspace_view_vector = PosWorld - vecViewPos;
vsOutStruct.tangenteye = mul(worldToTangentSpace, -objectspace_view_vector); // V
vsOutStruct.Att1 = objectspace_light_vector * (vecLightColor3.w*0.6);

half3 objectspace_light_vector2 = PosWorld - vecLightPos4 ;
vsOutStruct.tangentlight2 = mul(worldToTangentSpace, -objectspace_light_vector2); // L
vsOutStruct.Att2 = objectspace_light_vector2 * (vecLightColor4.w*0.6);

return vsOutStruct;
}

struct PS_INPUT_STRUCT1
{
half2 bump_map: TEXCOORD0;
half3 tangentlight: TEXCOORD1;
half3 tangentlight2:TEXCOORD2;
half3 tangenteye: TEXCOORD3;
half3 Att1 : TEXCOORD4;
half3 Att2 : TEXCOORD6;
half4 eyeLinear: TEXCOORD5;
};

struct PS_OUTPUT_STRUCT1
{
half4 color0: COLOR0;
};

PS_OUTPUT_STRUCT1 PS_PASS1( PS_INPUT_STRUCT1 psInStruct )
{
PS_OUTPUT_STRUCT1 psOutStruct;

half4 Attenuation1 = mul(psInStruct.Att1, psInStruct.Att1);
half4 Attenuation2 = mul(psInStruct.Att2, psInStruct.Att2);

half3 eyevect = normalize(psInStruct.tangenteye);

// half2 modified_texcoord = ParallaxTexCoord(psInStruct.bump_map, BumpMapSampler, eyevect, parallax);

// half4 base = tex2D( ColorMapSampler, modified_texcoord);
half4 base = tex2D( ColorMapSampler, psInStruct.bump_map);
// half3 bump = bumpheight * (tex2D(BumpMapSampler, modified_texcoord) - 0.5); // fetch bump map
half3 bump = bumpheight * (tex2D(BumpMapSampler, psInStruct.bump_map) - 0.5); // fetch bump map
// normalize(bump);

half3 LightDir1 = normalize(psInStruct.tangentlight);
half3 ViewDir1 = normalize(psInStruct.tangenteye);
half4 diff1 = saturate(dot(bump, LightDir1)); // diffuse component
half3 Reflect1 = normalize(2 * diff1 * bump - LightDir1); // R
half4 spec1 = pow(saturate(dot(Reflect1, ViewDir1)), 15);


half3 LightDir2 = normalize(psInStruct.tangentlight2);
half4 diff2 = saturate(dot(bump, LightDir2)); // diffuse component
half3 Reflect2 = normalize(2 * diff2 * bump - LightDir2); // R
half4 spec2 = pow(saturate(dot(Reflect2, ViewDir1)), 15);


// half shadow1 = saturate(4 * diff1);
// half shadow2 = saturate(4 * diff2);

half4 shadow_map = tex2Dproj(shadowmap_1, psInStruct.eyeLinear);
half4 shadow_mapa = tex2Dproj(shadowmap_2, psInStruct.eyeLinear);

if (enable_shadows==false)
{
shadow_map =1;
shadow_mapa =1;
}

half4 shadow_map1 = shadow_map.b;
half4 shadow_map2 = shadow_mapa.r;

psOutStruct.color0.rgb =saturate((((/*shadow1*/ (base * diff1 + (spec1*base.w)) * (1-Attenuation1))*(vecLightColor3)))*saturate(shadow_map1))+
saturate(((/*shadow2*/ (base * diff2 + (spec2*base.w)) * (1-Attenuation2))*(vecLightColor4))*saturate(shadow_map2));

psOutStruct.color0.a = 1.0f;

return psOutStruct;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


struct VS_INPUT_STRUCT2
{
half4 position: POSITION;
half3 tangent: TEXCOORD1;
half3 binormal: TEXCOORD2;
half3 normal: NORMAL;
half2 texcoord0: TEXCOORD0;
};

struct VS_OUTPUT_STRUCT2
{
half4 position: POSITION;
half2 bump_map: TEXCOORD0;
half3 tangentlight: TEXCOORD1;
half3 tangenteye: TEXCOORD3;
half3 Att1 : TEXCOORD4;
half3 Att2 : TEXCOORD6;
half3 tangentlight2: TEXCOORD2;
half4 eyeLinear: TEXCOORD5;
half Fog : FOG;
};

VS_OUTPUT_STRUCT2 VS_PASS2( VS_INPUT_STRUCT2 vsInStruct )
{
VS_OUTPUT_STRUCT2 vsOutStruct;
vsOutStruct.Fog = 10000;
vsOutStruct.position = mul( vsInStruct.position,matWorldViewProj );
vsOutStruct.bump_map = vsInStruct.texcoord0;

// compute the 3x3 tranform matrix
// to transform from world space to tangent space
half3x3 worldToTangentSpace;
worldToTangentSpace[0] = mul(vsInStruct.tangent, matWorld);
// worldToTangentSpace[1] = mul(cross(vsInStruct.tangent, vsInStruct.normal), -matWorld);
worldToTangentSpace[1] = mul(vsInStruct.binormal, -matWorld);
worldToTangentSpace[2] = mul(vsInStruct.normal, matWorld);

half3 PosWorld = mul(vsInStruct.position, matWorld);

// Output the projective texture coordinates
vsOutStruct.eyeLinear= mul( vsInStruct.position, matTexture );

//light 1
half3 objectspace_light_vector = PosWorld - vecLightPos5 ;
vsOutStruct.tangentlight = mul(worldToTangentSpace, -objectspace_light_vector); // L
half3 objectspace_view_vector = PosWorld - vecViewPos;
vsOutStruct.tangenteye = mul(worldToTangentSpace, -objectspace_view_vector); // V
vsOutStruct.Att1 = objectspace_light_vector * (vecLightColor5.w*0.6);

//light 2
half3 objectspace_light_vector2 = PosWorld - vecLightPos6 ;
vsOutStruct.tangentlight2 = mul(worldToTangentSpace, -objectspace_light_vector2); // L
vsOutStruct.Att2 = objectspace_light_vector2 * (vecLightColor6.w*0.6);

return vsOutStruct;
}


struct PS_INPUT_STRUCT2
{
half2 bump_map: TEXCOORD0;
half3 tangentlight: TEXCOORD1;
half3 tangenteye: TEXCOORD3;
half3 Att1 : TEXCOORD4;
half3 Att2 : TEXCOORD6;
half3 tangentlight2: TEXCOORD2;
half4 eyeLinear: TEXCOORD5;
};

struct PS_OUTPUT_STRUCT2
{
half4 color0: COLOR0;
};


PS_OUTPUT_STRUCT2 PS_PASS2( PS_INPUT_STRUCT2 psInStruct )
{
PS_OUTPUT_STRUCT2 psOutStruct;

half4 Attenuation1 = mul(psInStruct.Att1, psInStruct.Att1);
half4 Attenuation2 = mul(psInStruct.Att2, psInStruct.Att2);

half4 base = tex2D( ColorMapSampler, psInStruct.bump_map);

half3 bump = bumpheight * (tex2D(BumpMapSampler, psInStruct.bump_map) - 0.5); // fetch bump map
// normalize(bump);

half3 LightDir1 = normalize(psInStruct.tangentlight);
half3 ViewDir1 = normalize(psInStruct.tangenteye);
half4 diff1 = saturate(dot(bump, LightDir1)); // diffuse component
half3 Reflect1 = normalize(2 * diff1 * bump - LightDir1); // R
half4 spec1 = pow(saturate(dot(Reflect1, ViewDir1)), 15);

half3 LightDir2 = normalize(psInStruct.tangentlight2);
half4 diff2 = saturate(dot(bump, LightDir2)); // diffuse component
half3 Reflect2 = normalize(2 * diff2 * bump - LightDir2); // R
half4 spec2 = pow(saturate(dot(Reflect2, ViewDir1)), 15);

// half shadow1 = saturate(4 * diff1);
// half shadow2 = saturate(4 * diff2);

half4 shadow_map =tex2Dproj(shadowmap_2, psInStruct.eyeLinear);

if (enable_shadows==false)
{
shadow_map =1;

}

half4 shadow_map1 = shadow_map.g;
half4 shadow_map2 = shadow_map.b;

psOutStruct.color0.rgb = (ambientcolor * base) + saturate((((/*shadow1**/ (base * diff1 + (spec1*base.w)) * (1-Attenuation1))*(vecLightColor5)))*saturate(shadow_map1))+
saturate(((/*shadow2* */(base * diff2 + (spec2*base.w)) * (1-Attenuation2))*(vecLightColor6))*saturate(shadow_map2));

psOutStruct.color0.a = 1.0f;

return psOutStruct;
}




Sphere Engine--the premier A6 graphics plugin.
Re: stumped [Re: Matt_Aufderheide] #36970
11/28/05 17:57
11/28/05 17:57
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
Mat coles posted a 2.0 script earlier in the post
http://www.coniserver.net/ubbthreads/sho...art=15&vc=1
That "should" work with my card, correct?

Re: stumped [Re: zefor] #36971
11/28/05 18:16
11/28/05 18:16
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
yes that should work


Sphere Engine--the premier A6 graphics plugin.
Re: stumped [Re: Matt_Aufderheide] #36972
11/28/05 18:31
11/28/05 18:31
Joined: Mar 2002
Posts: 221
USA
zefor Offline
Member
zefor  Offline
Member

Joined: Mar 2002
Posts: 221
USA
If I set my level geometry up the same way I did with the tutorial from the wiki, this should work, since the tutorial worked right? I still see black instead of bumpmapping. Do I need to use more than 1 dynamic light? Does it have to be far away or close? I am determined to get this working. Thank you for your help and patience.

Page 20 of 24 1 2 18 19 20 21 22 23 24

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