Comments (7)
Hey Amer,
I'm still plugging away at this, so I haven't really figured out everything yet. Previously, I was using this project to hook into the build, but it had some limitations and wasn't exactly designed for what I'm doing here. https://github.com/AArnott/CodeGeneration.Roslyn
I will probably end up doing something very similar, though. There is an MSBuild task in a nuget package which invokes a "Dotnet Tool" taking a bunch of parameters. The tool then searches through the compilation context (which is constructed from MSBuild properties) and generates extra code based on that.
And yeah, I will need to separate out the stuff which goes into your product code (like the attributes), from the stuff that actually does the code generation.
from shadergen.
I see,
I tried to add quickly the MSBuild task and integrate it into project but had some trouble, will wait until you add the generation logic :)
from shadergen.
Hey @amerkoleci -- I added the ShaderGen.Build project, which has some basic MSBuild integration in it.
I'm using it in Veldrid now to generate some shaders for a new demo program. https://github.com/mellinoe/veldrid/blob/master/demo/Main/Shaders/Skybox.cs
Do you have your shader generation project anywhere that I could look at? After building this out for a bit, I have something that works decent enough, but is really messy. I want to go back and rewrite a lot of it now that I know how Roslyn works 😄
from shadergen.
Hey @mellinoe, I had some local code on my PC.
I've added swizzle support for Vectors and started adding some Half, Bool and Int vector, once I'm able I will try to create pull request :)
from shadergen.
Cool -- swizzle support will be nice for this. I'm just making really long constructor calls at the moment...
from shadergen.
Just created the pull request, see #2
from shadergen.
Check out https://github.com/paulcbetts/refit/tree/master/InterfaceStubGenerator.BuildTasks for msbuild task insights
from shadergen.
Related Issues (20)
- [Enhancement] Upgrade Shader.App to .Net Core 2.2
- ShaderGen.Build does not generate any shader HOT 1
- Double precision support?
- About findFXC
- embedding generated shaders as part of the compilation process.
- Converting ShaderGen to work as a Roslyn Source Generator
- [SUGGESTION] Control compatibility level for method implementations. HOT 3
- [Suggestion] Add JetBrains.Annotations HOT 4
- NuGet packages out of order
- How do you normalize? HOT 3
- I can't output some file. HOT 6
- Who can give me a basic only demo project?
- When I use ShaderGen.Build ,I con't do with ComplexCompute.cs and SimpleCompute.cs .
- [Bug] Hlsl.bytes no longer produced. HOT 3
- [Bug] Tests fail on computers without OpenGLES
- [Enhancement] Add more options to ShaderGen.App to require shader compilations
- [Enhancement] Use a C# wrapper library for GLSLangValidator
- [Enhancement] Use GLSLangValidator to validate OpenGL Shaders
- [Enhancement] Add tests for ShaderGen.App
- [Enhancement] Asynchronously compile shaders
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shadergen.