stride3d / stride

Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
https://stride3d.net
MIT License
6.6k stars 952 forks source link

Shader code completion and coding experience improvements #157

Open tebjan opened 6 years ago

tebjan commented 6 years ago

this might be related to #14. writing shader code in visual studio is quite nice, but it lacks a few features one is used to. for example automatic bracket and indentation. and of course code completion. since xenko parses the xksl code anyways, it shouldn't be too complicated to add code completion to the experience. since i write a lot of shader code in most of my projects, i would invest some time into that later this year, if no one else is working on it.

xen2 commented 6 years ago

Quick note: with #14, the plan is to have most of shader parsing/processing code in C++. Not sure what to do yet about the xksl editing experience, since the C++ parsing code might not be good for that and maintaining the C# code just for that might be annoying (the idea was to completely get rid of it, but maybe we can keep it only tool side and still get rid of XKSL=>HLSL and HLSL=>GLSL code at least).

tebjan commented 6 years ago

ok, i see... hm, i think it might be quite good to keep a few parts of it to have some intelligence while writing shaders. it could be enough to only have a few dictionaries for code completion suggestions. we can discuss this further when either of us starts working on it.

xen2 commented 6 years ago

@tebjan Yes we will probably need to keep some code for that.

ghost commented 6 years ago

Something I would add here that I experience but I've not seen anyone else mention. Whenever I do something that causes a syntax error it opens up the error panel if it's closed and expands it if Ihave it collapsed. I end up undocking and moving the errors window to another monitor when working on XKSL files because it keeps flying on top of the editor. Doing even basic refactoring or adjustment of variables, where a syntax error exists for just a second causes the behavior and it's a struggle. I don't know what I would do if I didn't have a multi-monitor setup, I would probably just code XKSL in another editor.