[Solved] Why is the HLSL and not GLSL shader chosen?


#1

Working through some C# sample code. At this point …

When loading the Sample43/MatCustomShader.xml material, which uses the Smple43/TechniqueCustomShader.xml file, an error is thrown:

System.Exception: Could not find resource Shaders/HLSL/Sample43CustomShader.hlsl

This file does not exist, however the file Shaders/GLSL/Sample43CustomShader.glsl file does exist.

MatCustomShader.xml contents …

TechniqueCustomShader.xml contents …

And the comment at the top of that file tends to lead toward the .glsl file being the one desired, yet the engine goes for HLSL.

My own inexperience with materials and shaders leaves me with no help here.

Why does it seek out the .hlsl file and not the .glsl file?


#2

Ok, I think the answer is my engine is running D3D and not open GL.


#3

That would explain it lol. You new? Welcome if you are!