Gamestudio Links
Zorro Links
Newest Posts
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
1 registered members (AndrewAMD), 1,187 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
"Border-Shader"? #386027
10/27/11 07:24
10/27/11 07:24
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline OP
User
JoGa  Offline OP
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
Hi!

I don't know if its a simple question, what kind of Shader afford this colored border:
(the wooden "something" in the middle has it)

Does anybody know, how to do this? Is "Cell Shading" the right catchword? Or is implemented it in an other way?
Is it possible to add more than one shader to one model? For example a fur-shader and if the mouse is over the entity, this "Border-Shader", too.

Re: "Border-Shader"? [Re: JoGa] #386060
10/27/11 17:09
10/27/11 17:09
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
Yes, id guess they used celshading and some fancy particles there laugh

Re: "Border-Shader"? [Re: lostclimate] #390005
12/21/11 06:30
12/21/11 06:30
Joined: Dec 2011
Posts: 1
F
faverric40 Offline
Guest
faverric40  Offline
Guest
F

Joined: Dec 2011
Posts: 1
wow that good info.

Re: "Border-Shader"? [Re: faverric40] #390007
12/21/11 10:17
12/21/11 10:17
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ithink it´s a normal cel-shading+outline shader... like this:
Code:
texture entSkin1;
	texture mtlSkin1;
	texture mtlSkin2;
	matrix matWorldViewProj;
	matrix matWorld;
	vector vecSkill41;
	vector vecSunDir; 

	technique toon
	{
		//-------------------------------paint
		pass p0
		{
			texture[0]=<mtlSkin1>;
			texture[1]=<mtlSkin2>;
			texture[2]=<entSkin1>; 

			addressU[1]=clamp; 

			magFilter[2]=linear;
			minFilter[2]=linear;
			mipFilter[2]=linear;

			vertexShaderConstant[0]=<matWorldViewProj>;
			vertexShaderConstant[4]=<matWorld>; 

			vertexShaderConstant[16]=<vecSunDir>; 

			vertexShader=
			asm
			{
				vs.1.1
				dcl_position v0
				dcl_normal v3
				dcl_texcoord0 v7
				dcl_texcoord1 v8

				m4x4 oPos,v0,c0	  // transform position to clip space
				m3x3 r0,v3,c4	  // transform normal to world space
				dp3 r0.w,r0,r0	  // renormalize it
				rsq r0.w,r0.w
				mul r0,r0,r0.w
				mov oT0.xyz,r0.xyz  // output normal to oT0
				mov oT1.xyz,-c16    // output light direction to oT1
				mov oT2.xy,v7.xy    // output uvs to oT2
			};
			pixelShader=
			asm
			{
				ps.1.3
				tex t0		    // fetch normalized normal
				texdp3tex t1,t0_bx2 // light.normal=u -> use u to lookup in t1 
				// _bx2 -> 0..1 of normcube will be   -1..1 
				tex t2		    // sample color map
				mul r0,t2,t1	    // modulate with shading
			};
		}
		//--------------------------------------------ink
		pass p1
		{
			cullMode=cw;
			vertexShaderConstant[0]=<matWorldViewProj>;
			vertexShaderConstant[16]=<vecSkill41>; // outline_thickness, 0, 0, 0
			vertexShader=
			asm
			{
				vs.1.1
				dcl_position v0
				dcl_normal v3
				dcl_texcoord0 v7
				dcl_texcoord1 v8

				mov r0,v0
				mul r1,c16.x,v3		  // scale normal
				add r0.xyz,r0.xyz,r1.xyz  // shell offset 
				//(vertex position + scaled normal)
				m4x4 oPos,r0,c0		  // transform position to clip space
			};
			pixelShader=
			asm
			{
				ps.1.3
				def c0,0,0,0,1		  // outline rgba
				mov r0,c0
			};
		}
	}


in the line commented with "//outline rgba", you can change the outline color to.. perhaps.. that orange..


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<

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