SieR-VR / typesl

Typescript to GLSL transpiler
MIT License
17 stars 1 forks source link

Converting TypeScript functions to GLSL functions #1

Open jarble opened 1 week ago

jarble commented 1 week ago

Is this compiler capable of generating GLSL functions from TypeScript functions? For example, I'd write a function like this:

export function add(a:number,b:number):number{
    return a+b;
}

and the compiler would generate a function like this:

float add(float a, float b){
    return a + b;
}
SieR-VR commented 1 week ago

Thanks for first issue!

The answer is no, currently it supports only entry functions.

It could be milestone feature, will be added for future version.

But I can't implement it now, this is not my main project and I couldn't find any motivation for this.

There's more breaking change like WebGPU and WGSL or Typescript compiler update.