AlricDoRei

Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

147 Neutral

About AlricDoRei

  • Rank
    Newbie
  1. Here is my code: [CODE]glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, myTexture); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR); glEnable(GL_BLEND); glColor3f(1.0f, 1.0f, 1.0f); glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f, 0.0f); glTexCoord2f(1.0f, 0.0f); glVertex2f(1.0f, 0.0f); glTexCoord2f(1.0f, 1.0f); glVertex2f(1.0f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex2f(0.0f, 1.0f); glEnd(); glDisable(GL_BLEND); glBindTexture(GL_TEXTURE_2D, 0); glDisable(GL_TEXTURE_2D);[/CODE] How to emulate these lines using glsl? [CODE]glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR); glEnable(GL_BLEND);[/CODE] Here is my shader program: vertex shader [CODE]void main(void) { gl_TexCoord[0] = gl_Vertex; gl_Position = gl_Vertex * 2.0 - 1.0; }[/CODE] fragment shader:[CODE] uniform sampler2D Texture; void main() { vec3 Color = texture2D(Texture, gl_TexCoord[0].st).rgb; gl_FragColor = vec4(Color, 1.0); } [/CODE]