Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
2 registered members (AndrewAMD, Ayumi), 853 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Projection texture (FFP) [Re: alibaba] #315145
03/13/10 14:19
03/13/10 14:19
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
no one?

Re: Projection texture (FFP) [Re: Rei_Ayanami] #315276
03/14/10 13:59
03/14/10 13:59
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
To apply it to level blocks, you must modulate the last result in the FFP material with entskin3. So there are 3 texture stage

1. Modulate block's texture with flashlight texture(transformed)
2. Modulate current texture with diffuse
3. Modulate current texture with lightmap texture

The 2nd step is optional, only if you want to use dynamic lights, if not, just skip to step 3.
I forgot the detail. I'll try to dig my files at home, maybe tomorrow...

Re: Projection texture (FFP) [Re: bart_the_13th] #315284
03/14/10 14:26
03/14/10 14:26
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Thanks, but i don't even know what i have to include or which functions i need - sorry that i am so stupid...

Re: Projection texture (FFP) [Re: Rei_Ayanami] #315287
03/14/10 14:34
03/14/10 14:34
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany

Re: Projection texture (FFP) [Re: Pappenheimer] #315503
03/16/10 07:42
03/16/10 07:42
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Try this material for your level blocks
Code:
//Apply this material to levelblocks
MATERIAL* mtl_pTexBlock = 
{
	effect = "
	////////////////////////////////////////////////////////
	// Projected texture (FFP) by Xd1Vo
	// Adapted for level blocks by bart_the_13th
	////////////////////////////////////////////////////////
	
	float4x4 matEffect3;
	
	texture mtlSkin1;
	texture entSkin1;
	texture entSkin2;
	texture StencilMap;//I was planning to modulate the flashlight to the stencilmap too, but my A7E version doesnt allow it :P
	
	technique proj_tex
	{
	
		pass p0
		{
			Texture[0] = <entSkin1>; // texture
			Texture[1] = <entSkin2>; // light map
			Texture[2] = <mtlSkin1>; // projected shadow/flashlight
			
			
			FogEnable=1;
			ColorArg1[0] = Texture;  
			ColorArg2[0] = Diffuse;
			ColorOp[0]   = Modulate;  //use selectArg1 if not using dynamic lights
			ResultArg[0] = Temp;      //Temp = texture + diffuse
	
			ColorArg1[1] = Texture;
			ColorArg2[1] = Current;
			ColorOp[1]   = Modulate2X;
			
			ColorArg1[2] = Texture;
			ColorArg2[2] = Current;
			ColorOp[2]   = Add;
			magfilter[2] = linear;
			minfilter[2] = linear;
			mipfilter[2] = linear;
			
			AddressU[2] = BORDER;
			AddressV[2] = BORDER;
			BorderColor[2] = 0x000001;  
			
			texcoordindex[2] = cameraspaceposition ; 
			TextureTransformFlags[2] = count3 |projected;
			TextureTransform[2] = <matEffect3>;
	
			ColorArg1[3] = temp;     // (shadow map + vertex lighting)
			ColorArg2[3] = Current;  // (color map + detail map)
			ColorOp[3]   = Modulate2X; // modulate (color map + detail map) with (shadow map + vertex lighting)
			magfilter[3] = linear;
			minfilter[3] = linear;
			mipfilter[3] = linear;
		}
		
	}
	";
}

/* Add these lines to main function

if(flashlite!=NULL)
{
	create_dxmat(mat_effect3,flashlite.x,flashlite.pan,focus,mtl_pTexBlock.skin3); //eagle
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////
*/



This one is a modififed pTex from XD1V0.

Re: Projection texture (FFP) [Re: bart_the_13th] #330953
07/01/10 08:04
07/01/10 08:04
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline
Member
flatron  Offline
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
is it possible to make a function in shader that do like command in pass so it is possible to add this shader to others like normal and others?

Re: Projection texture (FFP) [Re: flatron] #331177
07/02/10 12:11
07/02/10 12:11
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Never tried it but it should be possible...

Re: Projection texture (FFP) [Re: bart_the_13th] #331430
07/04/10 06:45
07/04/10 06:45
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline
Member
flatron  Offline
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
please some one convert them to a regular hlsl code (no code in pass) or help me and show me an example toconvert this code.

Re: Projection texture (FFP) [Re: flatron] #340167
09/01/10 15:41
09/01/10 15:41
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
can someone exlpain this:

the flashlight is correct, but the sunlight is strange


Visit my site: www.masterq32.de
Re: Projection texture (FFP) [Re: MasterQ32] #438536
03/16/14 20:42
03/16/14 20:42
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
And where is the code of XD1v0 now?

Page 3 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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