GLSL着色器的正确文件扩展名是什么? [英] What is the correct file extension for GLSL shaders?
问题描述
我正在学习glsl底纹,并且遇到了不同的文件格式.我见过人们给他们的顶点和片段着色器.vert
和.frag
扩展.但是我还看到了.vsh
和.fsh
扩展名,甚至在单个.glsl
文件中还同时使用了两个着色器.所以我想知道是否有标准的文件格式,或者正确"的格式是哪种?
I'm learning glsl shading and I've come across different file formats. I've seen people giving their vertex and fragment shaders .vert
and .frag
extensions. But I've also seen .vsh
and .fsh
extensions, and even both shaders together in a single .glsl
file. So I'm wondering if there is a standard file format, or which way is the 'correct' one?
推荐答案
GLSL着色器没有标准文件扩展名.最常见的可能是.vert
和.frag
,因为这些是3D Labs在其某些工具中使用的扩展.但这适用于任何形式的标准扩展.
There is no standard file extension for GLSL shaders. The most common ones are probably .vert
and .frag
, as these are the extensions that 3D Labs used in some of their tools. But that's about it for any form of standard extension.
这篇关于GLSL着色器的正确文件扩展名是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!