x


What is the code for the standard cg fragment shader?

Hej

I am extending the toon shaders from the toon shader package, but the CG code only has a vertex program. I was wondering if anybody could tell exactly what happens in the fixed function fragment processor, as I assume this is being called in the abstance of any user defined fragment programs.

more ▼

asked May 12 '10 at 03:05 PM

tomjen gravatar image

tomjen
69 3 3 7

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I was never fully on top of the communication between the vertex and fragment stages of the GPU pipeline in general, but iirc the basic function of the vertex shader is to take the vertices, figure out their color, uv & normal, and deliver to the fragment shader appropriately-interpolated values based on the position of the pixel being rendered within the tri. Whether there are any more vert shader outputs you can go looking for than the existing fragment shader takes in... is beyond the scope of my knowledge, but you may try poking around the ShaderLab manual.

more ▼

answered May 12 '10 at 04:53 PM

sean gravatar image

sean
296 11 12 19

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1667
x88

asked: May 12 '10 at 03:05 PM

Seen: 1514 times

Last Updated: May 12 '10 at 03:05 PM