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

Buffers and Textures as method parameter #784

Open
luoluo39 opened this issue Apr 11, 2024 · 0 comments
Open

Buffers and Textures as method parameter #784

luoluo39 opened this issue Apr 11, 2024 · 0 comments
Labels
question ❓ Further information is requested untriaged 🧰 A new issue that needs initial triage

Comments

@luoluo39
Copy link

As far as I know, hlsl supports pass buffers and textures in method call. Are there any plans to support this?

Currently, I must maintain copies of the same function for each shader and each parameter

for example, to achieve something like
public readonly void DoSomething(ReadWriteBuffer<uint> array);
I have to make method variants and copies for every buffer and every shader, and situation may even get worse if their are more than one parameters

public ReadWriteBuffer<uint> array1;
public ReadWriteBuffer<uint> array2;
public ReadWriteBuffer<uint> array3;

public readonly void DoSomethingOverArray1AndArray2();
public readonly void DoSomethingOverArray1AndArray3();
public readonly void DoSomethingOverArray2AndArray3();

This looks foolish and brings a lot of trouble

@luoluo39 luoluo39 added question ❓ Further information is requested untriaged 🧰 A new issue that needs initial triage labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❓ Further information is requested untriaged 🧰 A new issue that needs initial triage
Projects
None yet
Development

No branches or pull requests

1 participant