After following several different tutorials on OpenGL shaders, I noticed they all use different naming for the outs and ins.

For instance, I've seen ex_color vFragColor, ModelViewMatrix, mvMatrix, etc.

It would be nice if my shaders would be compatible with some other shaders out there without having to rename everything. Is there some kind of naming scheme, or standard I could follow that is more or less common?

有帮助吗?

解决方案

There is no naming convention for interface variable names. You should use whatever works and makes sense for your needs.

Also, there's no need to be "compatible" with other people shaders if you don't copy and paste their code into your own.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top