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.
GLSLシェーダーでどのように参照渡しをしますか?
inout関数シグネチャのように属性をマークすることができます。これにより、属性は効果的に「参照渡し」されます。
inout
例えば、
void doSomething( vec3 trans, inout mat4 mat )
これmatが「参照渡し」で、trans値渡しです。
mat
trans
mat書き込み可能である必要があります(つまり、統一された属性ではありません)