Open greggman opened 1 month ago
I think that the text in section 7.1.5 is intended to apply here instead of the more general langauge. I'll create an MR to update the spec to make this clearer.
That seems strange. I would think 4.5 is the entire point of centroid. Otherwise, what does centroid do?
Maybe I wasn't clear, sorry. The text in 7.1.5 should apply to gl_FragCoord, the text in 4.5 will apply to everything else. 4.5 is the entire point of centroid and 7.1.5 is saying that it just doesn't do anything for gl_FragCoord. GLSL has (what I consider to be) a bad habit of allowing these things that don't work and just having them mean nothing instead of giving an error message.
I imagine that the reason centroid doesn't work on FragCoord is related to hardware differences between varyings interpolation and the fixed-function positions that come from the rasteriser, which probably don't always support forcing to within the primitive.
Oh! right. that makes sense. Thanks
In the GLSL ES 3.2 spec in relation to
gl_FragCoord
In section 4.5 it says
Where as in section 7.1.5 it says
It seems like section 4.5 says in centroid mode "that value must be ... in the primitive being rendered" where as 7.1.5 says it doesn't.