GLSL着色器的正确文件扩展名是什么? [英] What is the correct file extension for GLSL shaders?

查看:199
本文介绍了GLSL着色器的正确文件扩展名是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆