Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, Ayumi, 7th_zorro), 877 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[mtl_terraintex] cant set detail_size ? #397503
03/19/12 19:59
03/19/12 19:59
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
I'm trying to use mtl_terraintex with a model but am not seeing a difference in tiling, regardless of how i detail_size, could i be overlooking something ?

this seems to be the shader code but i dont see anythng in it that seems to relate to tiling the texture

Code:
//////////////////////////////////////////////////////////////////////
// terraintex.fx
// Terrain material for an unlimited number of terrain textures
// Tiled texture on RGB, mask on alpha 

Texture entSkin1; // basic tiled terrain texture
Texture LightMap; // lightmap created by the map compiler

bool PASS_SOLID; // enforce rendering on the solid pass

bool AUTORELOAD;

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

// technique without lightmap
technique terraintex
{
   pass multi_repeat11
   {
      ZWriteEnable = True;
		AlphaBlendEnable = True;
		SrcBlend = SrcAlpha;
      DestBlend = InvSrcAlpha;
		
		Texture[0] = <entSkin1>;
		TexCoordIndex[0] = 0;
		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = Texture;
		
		Texture[1] = <entSkin1>;
		TexCoordIndex[1] = 1;
      ColorArg1[1] = Texture; 
	   ColorArg2[1]= Diffuse;
	   ColorOp[1] = Modulate2x;
	   AlphaArg1[1] = Current;
	   AlphaOp[1] = SelectArg1;

	   ColorOp[2] = Disable;
	   AlphaOp[2] = Disable;
	}
}

// technique with lightmap
technique terraintex_lm
{
	pass multi_repeat11
	{
      ZWriteEnable = True;
		AlphaBlendEnable = True;
		SrcBlend = SrcAlpha;
      DestBlend = InvSrcAlpha;
		
		Texture[0] = <entSkin1>;
		TexCoordIndex[0] = 0;
		AlphaOp[0] = SelectArg1;
		AlphaArg1[0] = Texture;
		
		Texture[1] = <LightMap>;
		TexCoordIndex[1] = 0;
      ColorArg1[1] = Texture; 
	   ColorArg2[1]= Diffuse;
	   ColorOp[1] = AddSigned;
	   AlphaArg1[1] = Current;
	   AlphaOp[1] = SelectArg1;

		Texture[2] = <entSkin1>;
		TexCoordIndex[2] = 1;
      ColorArg1[2] = Texture; 
	   ColorArg2[2]= Current;
	   ColorOp[2] = Modulate2x;
	   AlphaArg1[2] = Current;
	   AlphaOp[2] = SelectArg1;

	   ColorOp[3] = Disable;
	   AlphaOp[3] = Disable;
	}
}

// fallback if nothing works
technique fallback { pass one { } }



Re: [mtl_terraintex] cant set detail_size ? [Re: darkinferno] #397964
03/25/12 22:21
03/25/12 22:21
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
anyone ?

Re: [mtl_terraintex] cant set detail_size ? [Re: darkinferno] #397966
03/25/12 22:42
03/25/12 22:42
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
With a model or terrain? It works pretty well for me, if you want I can upload demo with terrain. Never tried it with a model.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: [mtl_terraintex] cant set detail_size ? [Re: 3run] #397968
03/25/12 22:53
03/25/12 22:53
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i'm trying to get it to work with a model

Re: [mtl_terraintex] cant set detail_size ? [Re: darkinferno] #397984
03/26/12 08:45
03/26/12 08:45
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
as I remember there are older versions of this fixed function effect available at this forum or at the wiki, where probably not detail_size is used for tiling, i.e. could be used for models too. just an idea for searching laugh.


Free world editor for 3D Gamestudio: MapBuilder Editor

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