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 (TedMar), 1,420 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
Page 2 of 2 1 2
Re: What are shaders? What do they do? Uses? [Re: ulillillia] #46675
05/26/05 07:57
05/26/05 07:57
Joined: Oct 2004
Posts: 493
W
WHURL Offline
Senior Member
WHURL  Offline
Senior Member
W

Joined: Oct 2004
Posts: 493
Quote:

It seems, though, that a lot of stuff from shaders can simply be done with a skin image so what's the point in having a shader in this case?




If you can get the effect you are after by simply using a skin, then you should do so. Look to shaders to provide effects that just cannot be achieved that way. Obvious examples would include things like glass with refraction and reflection, objects with specular highlights etc.

There are some popular shader example pics at the NVidia site that might spark your imagination and show you some effects that would require a shader.


So Many Toys... So Little Time. A place to lurk while you work > irc://irc.webchat.org/3DGS
Re: What are shaders? What do they do? Uses? [Re: ulillillia] #46676
05/26/05 08:05
05/26/05 08:05
Joined: Oct 2003
Posts: 2,628
IL,US
FeiHongJr Offline
Expert
FeiHongJr  Offline
Expert

Joined: Oct 2003
Posts: 2,628
IL,US
if i understood correctly i have the same problem where its difficult to tell where one wall starts and the other ends. Only thing ive found to help is to move the texture on the x or y axis a lil bit to throw off the seemless apearance. Heres a couple examples of bumpmapping in gimp.. not really the same but might help

with out bump mapping


with bumpmapping


without bumpmapping


with bumpmapping and color adjustments


Now since this is only 2d its not really the same but notice how the grout appears more imbedded into the tiles with the bumpmapping. In a 3d world this would be dependant on the way light reflects from the object and make it appear as tho its higher detail then just a flat block with a texture on it hope this helps


http://www.freewebs.com/otama_syndicate/index.htm - Each master to his own technique.

- Not me said the bee, Nor I said the fly.
Re: What are shaders? What do they do? Uses? [Re: FeiHongJr] #46677
05/26/05 08:15
05/26/05 08:15
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
I still have some unanswered questions:

What are vertex and pixel shaders? What's the pros and cons between the 2?

Explain what the specs mean in the specs for my Radeon 9600 XT card?

One final thing, my beach has a very low-res texture and I can't think of any way to make it look better without the possibility of using a 16384x16384 texture for a resolution of 2 quants per pixel.... Right now, I'm using a 2048x2048 texture and the resolution is a horrible 18 quants per pixel, even with the entire mapping filling the entire space (only a top mapping is needed) . If I can apply bump mapping, I could use a 1024x1024 texture or even 512x512. There isn't any other way that I can think of to make it look at least halfway decent. Bump mapping may seem to be a useful option....


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: What are shaders? What do they do? Uses? [Re: ulillillia] #46678
05/26/05 08:44
05/26/05 08:44
Joined: Oct 2003
Posts: 2,628
IL,US
FeiHongJr Offline
Expert
FeiHongJr  Offline
Expert

Joined: Oct 2003
Posts: 2,628
IL,US
Sorry not really sure what pixel and vertex shaders are. My guess is shaders which can be applied to pixels or vertexs Shrugs no clue.

the specs mean.

V.S. version of vertex shader which could be used
P.S. version of pixel shader which could be used
T&L T&L is available with your card
tex number of textures supported

last is pretty self explanatory

for your beach not really sure prehaps look into detail mapping as well hopefully one of the shader gurus can step in and clear things up further since i dont know much if anything about them


http://www.freewebs.com/otama_syndicate/index.htm - Each master to his own technique.

- Not me said the bee, Nor I said the fly.
Re: What are shaders? What do they do? Uses? [Re: FeiHongJr] #46679
05/26/05 09:18
05/26/05 09:18
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Actually, the last isn't so self-explanatory. 2048x2048x1024 - a texture size of 2048x2048 at a maximum bit depth of 1024 bits. I've never seen anything above 32-bit color, so how can it support 1024-bit color. Is there some hidden feature on that video card that I don't know about? I checked my settings and I have 8-bit color (yuck!), 16-bit color (fair, but don't like as it causes problems in MSPaint (inaccurate colors)), and 32-bit color (I'm using this). I don't see anything for anything higher than 32, so how can it support 1024-bit color!?

Detail mapping, as far as I've heard, only applies to terrain. This is a model and it cannot be converted to a terrain.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: What are shaders? What do they do? Uses? [Re: ulillillia] #46680
05/26/05 10:14
05/26/05 10:14
Joined: Oct 2003
Posts: 2,628
IL,US
FeiHongJr Offline
Expert
FeiHongJr  Offline
Expert

Joined: Oct 2003
Posts: 2,628
IL,US
hmmm honestly didnt pay attention to that.. No clue what the last numbers mean, Like you said i highly doubt its bits ...

Im pretty sure not positive that detail maps could be used for models as well. I think a terrain is basically a model minus some data so dont see why it wouldnt work.


http://www.freewebs.com/otama_syndicate/index.htm - Each master to his own technique.

- Not me said the bee, Nor I said the fly.
Re: What are shaders? What do they do? Uses? [Re: ulillillia] #46681
05/26/05 10:36
05/26/05 10:36
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Quote:


What are vertex and pixel shaders?




Ok, here goes:

So this makes sense, i have to start at the beginning...A few years ago, all graphics cards implemeted a fixed set of vertex and texture instructions, determined by the API(s) they chose to support. the main API has been Direct3D and that's the one i kow something about, so I'll restrict my comments to that.

Therfore, Microsoft wrote direct3d to give developers access to hardware functions. So basically, Microsoft decided that among other things, 3D primitves should be triangular polygons, and nothing else. Also, they decided on a few fixed texturing methods and blending options.

In any case, the cards that supported early versions of Drect3d(to d3x7) all worked essentially the same way, giving graphics developers a limited number of thing they could do. For instance, if you wanted to do environment mapping, there was only one or so ways it could be done.. so you in your app you write somehting like ENVIRONMENTMAP, and D3D takes care of everything else (I'm simplifying this a lot) This worked well beaause it was easy for developers to use and easy for card manufacteures to write their drivers. The main problem with this was becasue you only had a limited number of functions you could do, all games sort of looked alike, and there was no way to implement your own texture/vertex effects. if you wanted to use a non-standard lighitng model, you had to do it all in software, which was too slow.

This fixed-function approach was fittingly called the Fixed-Function Pipeline.
With DirectX8, Microsoft made the biggest leap so far in realtim 3d, they developed the concept of the programmable pipeline, in which vertex and pixel operations could be determined programatically. this of course required a a graphics CPU to process, now called a GPU..and Nvidia had already made such a thing, called the GeForce.

So with the stars aligned, now can say a few things about what shaders actually are and how they work.

First, the term 'shader' is probably unfortunate, because not all shaders have anythign to do with actually shading anything. Vertex shaders, for instance, only determine properties of, what else, vertices. A vertex shader, like a pixel shader, is a little program that can be run, in hardware, on every vertex that it is assigned to. To do this is software is of course extrmely slow, but its fast when the hardware does it. So you can do all sorts of neato things to a model on a per-vertex level. The most obvious is moving it around in novel ways. However, the most powerfull application of vertex shader is not manipulationg the positions of a vertex, indeed not to change the vertex at all, but to pass information to a pixel shader. Now a pixel shader program is run for every single pixel in the model texture. However, each pixel has only a few parent vertices on the uv map, so you can caluculate things on the vertices, and pass that to the pixels, so data is linearly interpolated. this means you can speed up caluculations. it is this relationship bewteen the vertex shader and the pixel shader which allows us to actually find the pixel's position in the 3D world, something that would be impossible without shaders. and once you know the pixel's position, you can treat it almost as a 3d object. In other words, pixels can be assigned a normal(a normal as you may know, is defined as the direction vector of a plane)..so a pixel can be interpreted as a polygon in 3d space, which can then be lit according to the world lighting model. Needless to say, this can improve the appearance of objects tremendously.

This sort of procedure is called per-pixel lighting/normalmapping,and just scratches the surface of what you can do with shaders. remember, the science and math here is nothing new, its all basic stuff developed years ago, but the big thing is that you make it all happen in hardware.

The possibilities are literaly endless. The developer can do pretty much any effects he can think of in video hardware now, because the hardware is just another CPU.

Another important thing pixel shadrs allow you do are graphics post-processing in realtime. You can implement photoshop style filters that can manipulate your textures on the fly.

Bascically, shaders are the most important tool the graphics developer has now, becaus eif you can think of a visual effect, it can probably be done in a shader. Name it, and there is a way.. even realtime raytracing and global illumination, hair, clothing, water,etc. Everyything you always wanted in 3d graphics are now possible, its just a matter of incremental improvements in performance.

I hope this helps a bit. Please excuse any typos or conceptual errors.

Re: What are shaders? What do they do? Uses? [Re: Matt_Aufderheide] #46682
05/26/05 11:01
05/26/05 11:01
Joined: Oct 2003
Posts: 2,628
IL,US
FeiHongJr Offline
Expert
FeiHongJr  Offline
Expert

Joined: Oct 2003
Posts: 2,628
IL,US
Thank you matt. Thats explained alot and was rather interesting


http://www.freewebs.com/otama_syndicate/index.htm - Each master to his own technique.

- Not me said the bee, Nor I said the fly.
Re: What are shaders? What do they do? Uses? [Re: Matt_Aufderheide] #46683
05/26/05 11:14
05/26/05 11:14
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline
Senior Member
Andreas C  Offline
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Matt,

thanks for this clear and understandable explanation.

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Page 2 of 2 1 2

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