0

互換コンテキストで opengl 3.2+ を使用し、フラグメント シェーダーを使用している場合、頂点シェーダーが必要ですか? 頂点ごとのライティング計算とその他の頂点ごとの計算を固定関数パイプラインで実行できるかどうか、またフラグメント シェーダーを使用できるかどうかを知りたいです。

また、これは頂点ごとの属性バインディングの場所にどのような影響を与えるでしょうか?

4

1 に答える 1

2

if per vertex lighting calculation and other per vertex calculations can be done by the fixed function pipeline

They can be done if you use fixed pipeline lights.Otherwise, part of it (like transformed normals,uv's and positions) must be computed elsewhere before being passed to the fragment shader.This "elsewhere" is called vertex shader.So yes,if you don't use fixed pipeline lightning system you must use vertex and fragment shader to process it.

Also,if you use fixed pipeline lightning you can still use shaders where you can access fixed light and material properties.But I see no point doing so unless you wish to break the defaul behavior.

于 2013-09-30T18:06:07.277 に答える