Quote Originally Posted by Lifepower View Post
Not sure for CUDA and GLSL, but previously you could theoretically make a Pascal compiler for shader code that generates assembly code for HLSL and then use fxc to compile the assembly. However, in latest versions they have deprecated assembly. On the other hand, if you manage to compile Pascal shader code directly, this could be quite interesting.

I wouldn't say that GLSL and HLSL are strictly C because they have facilities for vector math and other operations, and the code is usually pretty basic so there is not much you can improve by using Pascal syntax. However, if you are up for the task, it would be great if your compiler would have a framework similar to defunct/dying Microsoft Effect (*.fx) framework; it might not be that popular among game developers, but for scientific applications it really helps.
Yes, shaders could be in assembly in the past, but that is deprecated so I don't know if we can access all new features with it. But I think it is easier to just convert Pascal syntax to C syntax. That should be pretty straight.

With more and more programming moving to shaders as well as CUDA and OpenCL, I think it is vital for the Pascal language (and related languages like Ada) to have that support, so programmers aren't pushed towards the C syntax - again. I don't mind jumping between two different syntaxes and languages, but I know people who can't.