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
0 registered members (), 984 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: How to: tiles in 3dgs [Re: Hummel] #378770
07/26/11 12:43
07/26/11 12:43
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
NOOO, Shaders are bad!!!111111111
They don´t work on hardware older than 10 years!!!!!!!!!!!! Oh and shadermodel 3 is the devil himself as it won´t work on hardware older than 7 years!!!1111111111

Did I mention that my 2 years old iPhone can´t render anything without shaders? laugh

Re: How to: tiles in 3dgs [Re: Slin] #378773
07/26/11 13:04
07/26/11 13:04
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
All you young 'uns and your fancy shaders... What kind of programmers are you? wink


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: How to: tiles in 3dgs [Re: Redeemer] #378786
07/26/11 14:34
07/26/11 14:34
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482

Originally Posted By: Redeemer
All you young 'uns and your fancy shaders... What kind of programmers are you? wink

Shader programmer? grin

Re: How to: tiles in 3dgs [Re: bart_the_13th] #378790
07/26/11 15:02
07/26/11 15:02
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
have you tried using particles? they should render fast enough.

Re: How to: tiles in 3dgs [Re: Joey] #378803
07/26/11 17:14
07/26/11 17:14
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline OP
Expert
Joozey  Offline OP
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
haven't tried particles, but currently drawing a low resolution bitmap of the level that is visible (80x60 pixels), and scaled up 8 times with a panel. This works fast. To add detail I should apply a shader then I suppose. Was this the way proposed with the shader?


Click and join the 3dgs irc community!
Room: #3dgs
Re: How to: tiles in 3dgs [Re: Joozey] #378806
07/26/11 17:29
07/26/11 17:29
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
That is what I had in mind laugh Except I don't think panels can have shaders. I was thinking a quad, or doing it all in a pp-shader that takes into account level offset.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: How to: tiles in 3dgs [Re: JibbSmart] #378831
07/26/11 20:15
07/26/11 20:15
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
not exactly what I meant, but should work just as well. Do a point-sampled texture lookup for your base texture, and then, depending on the color of the pixel, fill the texel with a detailed tile. In principle that's something like

Code:
unsigned int4 base = tex2D(baseSampler, texCoord.xy);
switch (base.x) {
case 1:
    float3 out = tex2D(tile1Sampler, fmod(texCoord.xy*TILE_SIZE, TILE_SIZE);
    break;
...
}



Joey

Re: How to: tiles in 3dgs [Re: Joey] #378832
07/26/11 20:21
07/26/11 20:21
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
If the tiled textures are going to be quite small (like shown), I would pack them into one texture, and use the base texture as an offset within the tiled texture.

I think that'd be more efficient.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: How to: tiles in 3dgs [Re: JibbSmart] #378838
07/26/11 21:43
07/26/11 21:43
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
Yep, with other words: using an index map to sample the tile texture from a texture atlas.

Re: How to: tiles in 3dgs [Re: Hummel] #378846
07/26/11 23:07
07/26/11 23:07
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline OP
Expert
Joozey  Offline OP
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
What about just scaling the base color bitmap on screen, and apply a detail-bitmap on it with the shader? Just a black tga with transparent parts that form the details on the (plain colored) block.

Currently playing too much with the noise-landscape generator tongue.

Edit: I went for the cheap approach: put up a window element in a panel, apply one detail-tile tga bitmap to it, and resize the window to full screen. The detailed tile is automatically tiled over the screen. Insta-tiles. This also makes cubes from the sky though, not sure if I like that. Will try the shader approach too soon. Thanks for the shader snippet and all suggestions laugh.

Last edited by Joozey; 07/27/11 06:55.

Click and join the 3dgs irc community!
Room: #3dgs
Page 3 of 4 1 2 3 4

Moderated by  checkbutton, mk_1 

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