simontaylor81 / syrup Goto Github PK
View Code? Open in Web Editor NEWShader Rapid Prototyping
License: MIT License
Shader Rapid Prototyping
License: MIT License
Idea: switch to single output window with filterable categories instead of separate view for each category. Would avoid the "switch to shader compilation to see errors" crapiness.
I.e. print out the colour of the pixel underneath the mouse cursor.
Currently you can create a buffer from script, but it has to be one of the set types (e.g. R32B32G32A32_Float), you can't create custom structures. This is a pretty major limitation if, e.g. you wanted to create a light buffer or something.
So we need a way of passing packed structured data in from python. Possibly using struct module, or maybe ctypes.
Maybe
Instead of compiling shaders as soon as the script asks for one, just return a handle and defer until later.
Advantages:
e.g.
Allow scripts to call DispatchIndirect.
Allows DrawIndirect & friends, bindless textures, conservative raster, unlimited pain, etc.
Simple Find functionality in the editor is badly needed. Find in Files would be nice too (search all files in project).
Ability to create and render meshes from scratch from script.
Full intellisense for C# scripts (via Roslyn).
It doesn't like a file without an extension apparently.
I'm getting fed up with python and it's dynamicness, it makes everything harder. With Roslyn C# is now very straightforward to use as a scripting language, so I should investigate it.
Likely this would be added as a second option rather than completely replace python.
I.e. shader constants.
It's just setting the sampler state to the same slot as the texture, but that's not how it works in D3D11 -- sampler and texture are independent state that must be handled independently.
It's way nicer to declare sampler state in HLSL rather than in script. Unfortunately this is basically a feature of the Effects framework not HLSL proper, so it doesn't get passed through by the compiler. So it needs a custom HLSL parser.
HlslTools contains a good hlsl parser written in C# which is really easy to use, so this shouldn't be as hard as it sounds. The only slight issue is that it's not on Nuget so needs to be manually extracted from the application.
Shader compilation is slow and single threaded. Multiple shaders could easily be done on multiple cores. The problem is that the D3D shader compiler is not thread-safe (last time I checked, at least), so this needs to be done by offloading to a worker process.
Depends on #13.
Like Visual Studio/any half-decent editor. For script and shader errors.
For 3/4 component floating point vector properties in the properties window.
Not HLSL, so loads of fun to be had here.
Render scene in basic mode so you can still see/edit it in case you broke your shaders, or you effect is unsuitable for editing.
Float properties in the properties window should be configurable as sliders. Range must be customisable somehow (method likely differs for the different types of property). Both linear and logarithmic ranges should be supported. Vectors should be able to have individual component sliders.
When saving an in-use shader file. Maybe just when saving any shader file for simplicity?
User properties are set up during script execution, so can't affect script execution. They can only affect the per-frame callback. This means that they can't affect shader compilation (which happens at script execution, not per-frame). So you can't have a user property, for example, change a shader #define. That kinda sucks.
To support this changing the user property would have to trigger re-execution of the script. If done naively, that could of course mean that the user property would cease to exist. So we would need some new kind of scoping mechanism. Maybe a shader compile callback similar to the per-frame callback? That would mean that you couldn't use user properties to change, say, texture generation, however. Maybe user properties need to be declared up-front using some other mechanism? Or an explicit scoping mechanism, like ri.WithUserProp({...some code...})
?
Needs investigation and experimentation.
Actual viewport side of things should be relatively simple, since swap chains are already owned by the render window with the device independent. Will need UI for adding new windows, and handling of user-created render targets, which currently only support a single view. Plus lots of plumbing, no doubt.
Totally random idea, no idea if it would be useful or not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.