PDA

View Full Version : Embarrassed to ask this but to annoyed not to!


Nicholas Christopher
12-03-2008, 07:56 AM
I am trying to prevent per-pixel shading in my glsl shader , I have searched high and wide on the web found nothing, Can someone remind me on how to do per-vertex shading in glsl.

I have dealt with this once before, this time I will write myself a note!

Sol_HSA
12-03-2008, 08:14 AM
Do the lighting in the vertex shader, just output the colors to the fragment shader and when it gets the color, just feed it out without any further calculation.

Nicholas Christopher
12-03-2008, 12:48 PM
Thanks SOL, not what I remember (to be more accurate - not what I remember what I forgot), but certainly works ;)

Goz
12-03-2008, 11:42 PM
TBH that IS why its called per-vertex lighting and per-fragment lighting ;)

Nicholas Christopher
12-05-2008, 07:26 PM
TBH I find It a little odd that by using the mix function in my per-fragment
frag shader part changes my rendering from per-vertex to per-pixel .

Seems to me that not having the per-fragment part at all would have been the solution no?

starstutter
12-05-2008, 08:17 PM
Seems to me that not having the per-fragment part at all would have been the solution no?
if you wanted a totally blank screen, sure, I guess so.