Note that there are some explanatory texts on larger screens.

plurals
  1. USAndon M. Coleman
    primarykey
    data
    text
    plurals
    1. CO@jozxyqk Yeah, I do so much work with deferred shading these days I rarely give much thought to the expense of a matrix multiply in the fragment shader. It comes with the territory, you _have_ to transform the normal map out of tangent space in the fragment shader no matter what in deferred shading :) But it's only done once for the entire scene in deferred shading, so it is a nice trade-off.
      singulars
    2. COIndeed, implementation should be trivial. Half the lines of the shader are not even needed if source and destination have identical dimensions :) I do have to wonder what happens if you have 2 lights in this implementation, though. Usually you add the light terms for each light at each pixel rather than multiplying them together. If one light does not cover a pixel at all, it will multiply the previous light by 0.0...
      singulars
    3. COWe seem to be thinking of the situation in two different ways. My concern is that there is no perfect 1:1 mapping between the number of fragments on screen in his picture and the FBO texture attachment's resolution. The viewport on the left side of the screen isn't even the same aspect ratio. I'm not sure how explicitly fetching texels with `texelFetch (...)` would deliver different behaviour in such a situation? Effectively each fragment's relative area may be larger or smaller than a single texel, so you cannot have each fragment sample the texel center without inherent aliasing.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload