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

How to pass a texture input to a compute shader? #16

Open
theodox opened this issue Jan 3, 2020 · 2 comments
Open

How to pass a texture input to a compute shader? #16

theodox opened this issue Jan 3, 2020 · 2 comments

Comments

@theodox
Copy link

theodox commented Jan 3, 2020

Thanks for setting this up. The vanilla examples work for me and I've been able to tweak the USFs and that works as well. However I can't see how to pass a texture input to the compute shader. I added a Texture2D input to the usf and added this to the parameter macros:

    SHADER_PARAMETER_TEXTURE(Texture2D, TestTexture)

In the RunComputeShader_RenderThread example, I pass that along:

     PassParameters.TestTexture = DrawParameters.TestTexture->Resource->TextureRHI->GetTexture2D();

However I always hit a check exception:

 Assertion failed: Bindings.StructureLayoutHash == ParametersMetadata->GetLayoutHash() 

Any suggestions on where I should look? The UE documentation is of course entirely nonexistent :(

@Chomusuky
Copy link

I have the same error. Did you find a solution ? It looks like Epic hates developpers :'(

@sasmaster
Copy link

Anybody solved this one?

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

3 participants