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.
の範囲はgl_FragCoord.xy? gl_FragCoords が画面座標であることはわかっていますが、実際の範囲はどのくらいですか? ( 0, width - 1 )または( 1, width )?そして、glsl コンパイラが生成するエラー (ある場合) はgl_FragCoord.x - 5、fragcoord ベースの計算を行ったときのようなことをしたと言うでしょうか?
gl_FragCoord.xy
gl_FragCoord
( 0, width - 1 )
( 1, width )
gl_FragCoord.x - 5
ps: 正規化は必要ありません。
gl_FragCoord 座標は、0 から始まるインデックスが付けられます。
この式gl_FragCoord.x - 5は、[-5, (幅 - 5) - 1] の範囲の値になります。