PDA

View Full Version : wat is fragment shader?


zinzin
10-11-2005, 06:30 AM
you have pixl shader and vertex shader, so what is fragment shader?
lots ppl mentioning it, but I have no idea what it is!
thank you for anyone can explain it a bit to me!

phantastikfan
10-11-2005, 07:07 AM
you have pixl shader and vertex shader, so what is fragment shader?
lots ppl mentioning it, but I have no idea what it is!
thank you for anyone can explain it a bit to me!

Fragment shader is only another name for pixel shader!

zinzin
10-11-2005, 07:22 AM
oh I am less confused now


thank you very much~

playmesumch00ns
10-11-2005, 08:58 AM
... or rather a pixel shader is a less accurate term for a fragment shader.

When you shade fragments, you're not shading pixels but fragments of polygons (hence the name) that will then be sampled to make up the final pixel value.

Fragments that you shade may end up not being part of the final image at all.

zinzin
10-11-2005, 09:00 AM
is it just a information container like vertex shader?
just pass the information to renderer and then consider the pixal shader?

MacSlow
10-11-2005, 01:47 PM
To add yet another fine detail to the explanation already provided by the others... usually - in the area of OpenGL programmable shading - one speaks of "fragment shaders". In the domain of programmable shading under DirextX one usually refers to the same thing as "pixels shaders".

Best regards...

MacSlow

MacSlow
10-11-2005, 02:04 PM
is it just a information container like vertex shader?
just pass the information to renderer and then consider the pixal shader?

Judging from your quote there, I'm not sure if you know that vertex- and fragment/pixel-shaders are little programs executed on your graphic-cards GPU for every point and pixel processed. This is a bit different than your "everyday" RenderMan/MentalRay/WhatEverRenderer-shader executed by your computers CPU(s) while working on your animation-frames. The major difference is that it's much faster!

Do you have a rough idea of the processing-pipeline on a modern graphics-card? Depending on that I can give you a suited explanation where vertex- and fragment-shaders fit in the picutre.

Best regards...

MacSlow

zinzin
10-12-2005, 01:20 AM
hi thank you very much mac is very slow...:)

ye, as you guessed, I am new to rt shader stuff, but it looks very much like renderman isn't it.

I looked through the docu about the hardware render pipeline, but I don't know the details about how a graphic card- gpu works, if you can point me how or suggest me some learning material, I wall be appreciated!

I tried to find some computer graphic learning material, but it seems these are all from very basic stuff to mid-level, and not really usefully for HLSL, is there any tut or docu partucally focus on these? I would like to know how dot and cross be caculated or how a 4*4 matix work, how to transfer world view to camera projection view~ these questions confused me long time, and it seems unless someone explain to me face to face with drawing, or I will never make it clear, although it maybe sufficent to know how to use them, then just use them but I think it will be nice that to know what is behind.

thank you very much.

phantastikfan
10-12-2005, 08:13 AM
hi thank you very much mac is very slow...:)

ye, as you guessed, I am new to rt shader stuff, but it looks very much like renderman isn't it.

I looked through the docu about the hardware render pipeline, but I don't know the details about how a graphic card- gpu works, if you can point me how or suggest me some learning material, I wall be appreciated!

I tried to find some computer graphic learning material, but it seems these are all from very basic stuff to mid-level, and not really usefully for HLSL, is there any tut or docu partucally focus on these? I would like to know how dot and cross be caculated or how a 4*4 matix work, how to transfer world view to camera projection view~ these questions confused me long time, and it seems unless someone explain to me face to face with drawing, or I will never make it clear, although it maybe sufficent to know how to use them, then just use them but I think it will be nice that to know what is behind.

thank you very much.

I can recommend that book (http://www.amazon.com/exec/obidos/tg/detail/-/0321194969/qid=1129104729/sr=8-1/ref=pd_bbs_1/103-6250127-3031825?v=glance&s=books&n=507846).

zinzin
10-13-2005, 01:12 AM
thank you, I just had look of the customer review, it looks like something that I need
will purches this book, cheerz~~

MacSlow
10-15-2005, 09:29 PM
I would like to know how dot and cross be caculated or how a 4*4 matix work, how to transfer world view to camera projection view~ these questions confused me long time, and it seems unless someone explain to me face to face with drawing, or I will never make it clear, although it maybe sufficent to know how to use them, then just use them but I think it will be nice that to know what is behind.


Being the lazy brat that I am I just want to point you to four articles (courtesy of wikipedia) from the web:



dot product (http://en.wikipedia.org/wiki/Dot_product)
cross product (http://en.wikipedia.org/wiki/Dot_product)
matrix (http://en.wikipedia.org/wiki/Matrix_%28math%29)
matrix transformations (http://en.wikipedia.org/wiki/Transformation_matrix)
Of course you can seek up just about anything regarding maths there. I really like wikipedia for quickly looking up this stuff to help me to remember how things work and relate to each other. I also find it informative enough to learn new stuff from that.

A side note: If you're able to get your hands on a student-license of Maple (http://www.maplesoft.com) (computer algebra-system), you can more freely/quickly explore mathematical subjects. If you're really serious about getting the grip on math, Maple will become an invaluable tool for you. It's one versatile and amazing piece of software!

Best regards...

MacSlow

CGTalk Moderation
10-15-2005, 09:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.