Jump to content

  • Log In with Google      Sign In   
  • Create Account


sbar

Member Since 14 Oct 2012
Offline Last Active Oct 23 2012 03:38 PM

Posts I've Made

In Topic: [GLSL] Draw a textured (RGBA) polygon with opacity

15 October 2012 - 10:41 AM

You could also use the keyword 'flat' before 'varying' to turn off interpolation for that variable.

Thanks

Why are you using an ancient OpenGL version like 1.4 with the GLSL version introduced in OpenGL 2.1? If you need features introduced in GLSL 1.2, you are probably targeting GPUs which also support the OpenGL 2.1 version (and maybe also OpenGL 3.0).

I've got only old hardware right now (one of intel gma videocards), that supports only Open GL <=1.4, but GLSL 1.2 is also supported via ARB-extensions (not the way OpenGL >=2.0 works with).

Also, I'm confused. (Global) uniforms act per-primitive. How did you manage different values of a per-triangle attribute for each vertex?

If I understand right---that caused by assigning uniform to varying variable and only then using it (varying var) in fragment shader.

In Topic: [GLSL] Draw a textured (RGBA) polygon with opacity

14 October 2012 - 01:22 PM

The issue is resolved by declaring a uniform variable in fragment shader. By some reason I thought that it's impossible to use uniform variables inside a fragment shader.

PARTNERS