Coder Social home page Coder Social logo

syrup's Introduction

Syrup

Build status

Syrup is an application for quickly and easily prototyping graphical effects and techniques. It is an integrated development environment combining python scripting with HLSL shaders with a realtime preview with parameter tweaking.

It isn't really finished.

syrup's People

Contributors

simontaylor81 avatar

Watchers

 avatar  avatar

syrup's Issues

Misc todo

  • Clear previous script when loading new project
  • Open documents when adding to project
  • Add multiple files to project at once
  • Save changes prompt when closing document
  • Clear output window when re-running script
  • Proper output from script tests
  • Remove items from recently opened list if they don't exist
  • Save window layout
  • Save open documents outside of project file
  • Make open document set a service to avoid slightly tangled dependencies?

Parallel shader compilation

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.

Fallback render mode

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.

Sampler states are broken

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.

Lazy shader compilation

Instead of compiling shaders as soon as the script asks for one, just return a handle and defer until later.

Advantages:

  • Allows rest of script to execute, revealing errors, etc.
  • Necessary for parallel shader compile.
  • Possibly could only compile shaders actually needed for rendering (e.g. if different permutations are required depending on user variables).

Find in editor

Simple Find functionality in the editor is badly needed. Find in Files would be nice too (search all files in project).

C# as scripting language

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.

Create structure buffer from python

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.

C# Intellisense/autocomplete

Full intellisense for C# scripts (via Roslyn).

  • Only calculate diagnostics for documents that are visible
  • Go to definition: support destination in different file from source
  • Trigger new diagnostics when referenced files change
  • Parameter help
  • Semantic colouring
  • Analysers and code fixes
  • Manually triggered completion
  • Load XML documentation

Combined output window

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.

New file templates

e.g.

  • Basic shader file
  • Basic script file
  • Simple scene
  • Auto-create basic script from shader

Auto shader recompile

When saving an in-use shader file. Maybe just when saving any shader file for simplicity?

Allow user properties to affect shader compilation

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.

REPL

Totally random idea, no idea if it would be useful or not.

Vulkan

Not HLSL, so loads of fun to be had here.

Multiple viewports

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.

Sliders

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.

Use sampler state declared in HLSL

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.

Direct3D 12

Allows DrawIndirect & friends, bindless textures, conservative raster, unlimited pain, etc.

Colour picker

For 3/4 component floating point vector properties in the properties window.

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.