idly thinking about what a modern rendering api might look like for python.

you could do some cool things with the ast module to basically define shaders in python and then cross compile.

the rest of it would be a command queue thing written as a c module, and a nice data driven rendering api for setting up a compositing graph.

and some useful boilerplate like 3d model importing etc.

@aeva yea. How come shader has to be written in C? Why not python?

@JodiTheTigger you have it wrong, shaders would be written in python.

the c bits would just be graphics api boilerplate that need to be outside of python to be fast, tucked away behind a nice python api

@aeva nono. That's what I meant. Shader code not in a c based Lang would be wonderful.

@JodiTheTigger oh! there is no reason that requires C style syntax for shader languages, I think they just tend to because C++ is popular with games people.

Shaders are generally statically typed and compiled because that is fastest, but even that is not a set in stone requirement.


@JodiTheTigger @aeva what i have in mind is just borrowing python's syntax parser and ast, and doing some fancy type inference stuff to compile down to whatever the api needs (glsl, spirv, etc). So, won't be the full language by any stretch of the imagination, but it'll be a lot nicer than writing glsl etc.

Sign in to participate in the conversation

On the internet, everyone knows you're a cat — and that's totally okay.