GithubHelp home page GithubHelp logo

Excellent work about shadergen HOT 7 CLOSED

mellinoe avatar mellinoe commented on May 24, 2024
Excellent work

from shadergen.

Comments (7)

mellinoe avatar mellinoe commented on May 24, 2024

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.

amerkoleci avatar amerkoleci commented on May 24, 2024

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.

mellinoe avatar mellinoe commented on May 24, 2024

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.

amerkoleci avatar amerkoleci commented on May 24, 2024

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.

mellinoe avatar mellinoe commented on May 24, 2024

Cool -- swizzle support will be nice for this. I'm just making really long constructor calls at the moment...

from shadergen.

amerkoleci avatar amerkoleci commented on May 24, 2024

Just created the pull request, see #2

from shadergen.

ghuntley avatar ghuntley commented on May 24, 2024

Check out https://github.com/paulcbetts/refit/tree/master/InterfaceStubGenerator.BuildTasks for msbuild task insights

from shadergen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.