diff --git a/internal/shaderir/program.go b/internal/shaderir/program.go index d53414332..b5deea34d 100644 --- a/internal/shaderir/program.go +++ b/internal/shaderir/program.go @@ -45,8 +45,9 @@ type VertexFunc struct { Block Block } -// FragmentFunc takes pseudo in-params, and the number is len(varyings) + 1. -// The last param represents the coordinate of the fragment (gl_FragCoord in GLSL) +// FragmentFunc takes pseudo in-params, and the number is len(varyings) + 2. +// If index == len(varyings), the param represents the coordinate of the fragment (gl_FragCoord in GLSL). +// If index == len(varyings)+1, the param is an out-param representing the color of the pixel (gl_FragColor in GLSL). type FragmentFunc struct { Block Block }