Jump to content

  • Log In with Google      Sign In   
  • Create Account


GlSL .vert and .frag compile error


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Shawn619   Members   -  Reputation: 342

Like
0Likes
Like

Posted 27 August 2012 - 01:47 AM

I made this very basic .vert and .frag and i dont know why i can't get it to compile in my shader designer.

.vert

void main() {		  
	 // Set the position of the current vertex
	 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}

.frag

void main() {
vec4 color, lessen, res;

color = gl_Color;
lessen = vec4(0.5,0.5,0.5,1.0);

res = (color*lessen);

	 // Set the output color of our current pixel
	 gl_FragColor = res;
}

Shader Designer compile errors:
The fragment shader uses varying gl_Color, but geometry shader does not write to it.


Sponsor:

#2 BitMaster   Crossbones+   -  Reputation: 3942

Like
2Likes
Like

Posted 27 August 2012 - 01:56 AM

You are trying to read gl_Color in the fragment shader but you have never written a value to it in the vertex shader.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS