Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference of shaders with extensions .Shader, .vsh, .fsh?

What is the difference between files named "name. Shader" & "name. vsh" & "name. fsh" in scene kit ?when i call some shaders in my project my model would be like a purple mask. What should i do?

like image 961
Snapp Avatar asked Oct 27 '25 22:10

Snapp


1 Answers

there are three kinds of shaders when working with SceneKit.

As for every OpenGL app there are vertex shaders and fragment shaders. Vertex shaders often have the .vert or .vsh extension and fragment shaders often have the .frag or .fsh extension. These shaders are used with the SCNProgram class.

In addition SceneKit exposes the concept of shader modifiers which often have the .shader extension. Shader modifiers can affect either a vertex of fragment shader and are used with the SCNShadable protocol.

These file extensions are just indications and could be really anything you want.

like image 176
mnuages Avatar answered Oct 29 '25 12:10

mnuages