glsl - How does OpenGL interpolate varying variables on the fragment shader even if they are only set three times on the vertex shader? -


Since the top Shinde is run once per head (3 times the mean in the triangle), then how to calculate the variable variables for each Is the piece, if it is assigned (for example) only three times?

Piece Sha ader:

  Exact Medium Pommel Float; VC4 v_Color different; Zero main () {gl_FragColor = v_Color; }   

Vertex shader:

  attribute vec4 a_Position; Attribute vec4 a_Color; VC4 v_Color different; Zero main () {v_Color = a_Color; gl_Position = a_Position; }   

So, the question is, how does this system show how variable v_Color is calculated on each segment, because this shader is only three times (in a triangle) ) Provides v_Color.

All outputs of the peak shider are at the top when you enter v_Color If set, then it sets to the current top. When the piece shader runs, it reads the v_Color value for each head in primitive and intervals between them, depending on the location of the piece.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -