Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce sampler input node #90

Open
KaYaF opened this issue Dec 10, 2021 · 0 comments
Open

Introduce sampler input node #90

KaYaF opened this issue Dec 10, 2021 · 0 comments
Assignees

Comments

@KaYaF
Copy link
Collaborator

KaYaF commented Dec 10, 2021

In the current node specification, nodes cannot send sampler type values to the next node through sockets. This is because the glsl shader does not support sampler-type variables for local variables.

In more detail, In this library, all the node sends a value through a socket. Currently, each node has a shader function. And each socket corresponds to an argument of the function. each node sends or gets value by using the local variable. However, we cannot use the sampler-type variables as a local variable.

To support sampler type output socket, we will introduce the following special node:

  1. The node does not have the shader function.
  2. The node has only one sampler type uniform input socket and only one sampler output socket. The sampler output socket is a socket that can connect to only the sampler input socket.
  3. The sampler input socket connected with this special node can get the data of uniform input socket in the connected special node.

In order to achieve this, we will do the following steps:

  1. Creating abstract node class from current node class. The abstract node has only the socket information but does not have shader function information.
  2. Creating a new node class for inputting and outputting sampler.
  3. Supporting the import of the new node class from shaderity graph json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant