Advertisement

Vertex/Fragment Programs

Started by January 11, 2005 01:12 PM
25 comments, last by vincoof 19 years, 10 months ago
1)I know it may not be... but I was just wondering if you can modify global parameters in the shaders... For example I wannna do a waving effect per vertex, and need different angles at each frame, oh and last time I wasn`t able to modify any, gotta check back when I have the time

2)In the fragment`s color.w relyes it`s curent depth right ? I was wondering about doing some depth blur or blur generally, although I don`t really know what do with that component...

Relative Games - My apps

1) no, within a program you can't "write" to program parameters. They're read-only.

2) color.w is the fourth component of the color, thus alpha. Depth is a separate thing. See issues #6 and #7 of the ARB_fp spec.
Advertisement
Quote: Original post by vincoof
...another "more complete" shader debugger software ?

That's it. I heard the tool could simulate the GPU but that's not what I'm asking for however.

Previously "Krohm"

Shit, I wrote Color.w (yeah offcourse it`s alpha, damn I was so stupid/confused). I meant 'Position.w', I`ve seen in some thingyes it`s only 1, but does it hold the depth or is there anything else that holds depth ?

Relative Games - My apps

Quote: Original post by Krohm
Quote: Original post by vincoof
...another "more complete" shader debugger software ?

That's it. I heard the tool could simulate the GPU but that's not what I'm asking for however.

Alright, then I don't know of any shader debugger this advanced.

Quote: Original post by cippyboy
Shit, I wrote Color.w (yeah offcourse it`s alpha, damn I was so stupid/confused). I meant 'Position.w', I`ve seen in some thingyes it`s only 1, but does it hold the depth or is there anything else that holds depth ?

Granted that position can be checked in the framgent program (I'm not sure it is), position.w is the W component, which is not the depth. Depth would rather be position.z but still is a bit far from what can be called "depth" (as of frustums, depth ranges, and such).
fragment depth as in what it returns if we would call 'glreadpixels' and return the depth component at that pixel... Anyways, I dropped the shaders for a while

By the way, do you happen to know where I can find some Dot3 vertex/fragment shader ?

Like I have a diffuse texture, and a normal map,and I want 'Normal Mapping' :D , I have some code but it gets computed kind of nasty... should I post the vertex/fragment programs and/or pic ?

Relative Games - My apps

Advertisement
normal mapping is really straight-forward with ARB_vp/fp. You shouldn't encounter any real problems with them.
Google the web I guess you will find lots of progs/tuts about that.

This topic is closed to new replies.

Advertisement