Game/MMD

Gather

newpolaris 2017. 7. 8. 22:35

What does gather actually indicate?

references are as follows

https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_texture_gather.txt

___________________________________________________________________
 |                                                                 |
 |   1.0  +---+---+---+---+---+---+---+---+                        |
 |       7|   |   |   |   |   |   |   |   |                        |
 |        +---+---+---+---+---+---+---+---+                        |
 |       6|   |   |   |   |   | X | Y |   |                        |
 |        +---+---+---+---+---+---+---+---+                        |
 |       5|   |   |   |   |   | W | Z |   |                        |
 |        +---+---+---+---+---+---+---+---+                        |
 |       4|   |   |   |   |   |   |   |   |                        |
 |        +---+---+---+---+---+---+---+---+                        |
 |       3|   |   |   |   |   |   |   |   |                        |
 |        +---+---+---+---+---+---+---+---+                        |
 |       2|   |   |   |   |   |   |   |   |                        |
 |        +---+---+---+---+---+---+---+---+                        |
 |       1|   |   |   |   |   |   |   |   |                        |
 |        +---+---+---+---+---+---+---+---+                        |
 |       0|   |   |   |   |   |   |   |   |                        |
 |   0.0  +---+---+---+---+---+---+---+---+                        |
 |          0   1   2   3   4   5   6   7                          |
 |       0.0                             1.0                       |
 |                                                                 |
 |  Figure 3.10a.  An example of an 8x8 texture image and the      |
 |  components returned for textureGather.  The vector (X,Y,Z,W)   |
 |  is returned, where each component is taken from the post-      |
 |  swizzle R component of the corresponding texel.                |
 |_________________________________________________________________|

https://msdn.microsoft.com/ko-kr/library/windows/desktop/bb944003(v=vs.85).aspx.aspx)

+---+---+
| W | Z |  
+---+---+
| X | Y |  
+---+---+

Same value range Range [0.5-1.5), Range [1.5-2.5)