Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有采样器纹理的着色器。是否可以将当前片段的颜色与其任何邻居交换?如果是这样,怎么办?
uniform sampler2D map; varying vec2 vuv; void main() { gl_FragColor = texture2D(map, vuv); }
片段着色器只知道当前片段。交换颜色的唯一方法是创建将所有内容渲染为纹理的通道,然后创建一个后处理通道以交换颜色。希望这可以帮助。