#Render Graph Compute Shader Help

1 messages · Page 1 of 1 (latest)

prisma frost
#

I'm trying to access _ShapeLightTexture0 in my compute shader with render graph and I'm pretty stuck on figuring it out.

I've been at it for about 5 hours and still haven't figured it out. The code that makes the most sense is below. I'm using IComputeRenderGraphBuilder. I can send more of the code if needed but below is most of it that's applied to the light texture. Any help would be appreciated :chipichapa:

TextureHandle lightHandle = graph.ImportTexture(RTHandles.Alloc(Shader.GetGlobalTexture(lightTextureID)));

using IComputeRenderGraphBuilder builder = graph.AddComputePass("Radiance Cascades Pass", out PassData data);

builder.UseTexture(lightHandle, AccessFlags.Read);

builder.SetRenderFunc((PassData d, ComputeGraphContext ctx)

ctx.cmd.SetComputeTextureParam(d.compute, LightingKernel, lightTextureID, lightHandle);

lucid jay
#

!code

drowsy charmBOT
lucid jay
#

Providing some more context would also be helpful. Like what exactly is the issue? Do you have errors? Warnings? Does the compute shader have no access to the texture? How are you confirming that? Etc...

floral viper
#

Could try builder.UseGlobalTexture(Shader.PropertyToID(lightTextureID))

prisma frost
prisma frost
#

Let me get organize the code into a smaller file because right now it's pretty large

#

I reopened Unity for the first time since last night and now it just works?

#

I really love Unity but sometimes I'm just like sadok