Converting HLSL shaders to GLSL shaders is quite straightforward.
Here are some of the syntax that needs to be changed for them to work as GLSL shaders.
Texture2D
with sampler2D
void main() {
float3x3
with mat3
float4x4
with mat4
float2x2
with mat2
float2
with vec2
float3
with vec3
float4
with vec4
Load
with texelFetch
int3 loc = int3(i.pos.xy
with ivec2 loc = ivec2(gl_FragCoord.xy
Sample
with texture
i.uv
with f_texcoord
return
with Output =