Git Product home page Git Product logo

hlslmaterial's People

Contributors

adam-wolski avatar phyronnaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hlslmaterial's Issues

Including Operations Only Possible in Custom Nodes Causes the Entire Function To Be Inside A Custom Node

Ideally this plugin would be able to differentiate between content that needs to definitely be part of a Custom node and everything else in order to take advantage of constant folding.

Function code:

void testFunc(float3 color, float intensity, out float3 diffuse, out float x) {

	float val = 0.1;
	int i = 0;
	while ( i <= 10 ) {
		diffuse.x = (val * (float)i);
		i += 1;
	}

	x = intensity * 0.5;
}
  • Generated graph:
    image

  • Expected format: Intensity parameter and X output are not used within the while loop, and therefore could be broken out from the custom node:
    image

Feature Request: Composability

One of the main limitations of the custom node is that it doesn't allow for multiple functions to be defined/used in a single node.
A workaround exists where functions can be defined within a struct.

It would be awesome if the plugin could perform this process automatically, such that functions get automatically wrapped into a struct and calls to functions are swapped for calls to the function within the struct. Or alternatively, there may be a better workaround.

Includes are added even if they are guarded by #ifdef-s

When parsing includes in hlsl file all of them are added even if they are guarded by failed #ifdef

#include "header_a.ush"

#ifndef SOMEDEF
#include "header_b.ush"
#endif

Right now both header_a and header_b are included and this leads to compilation errors.

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.