#DOTS for shaders possible?

1 messages · Page 1 of 1 (latest)

analog sail
#

I'm wondering if the jobs and burst compiler can be incorporated into shaders. Right now, most of the CPU utilization is coming from shaders, and it's all in the main thread. So if I could write a shader using DOTS that seems like I could get a big win.

gaunt geyser
#

CPU does not execute shaders. It's only GPU's responsibility

wary spire
#

@stray shale any r&d into this area? math lib is really similar to shader functions and would be pretty cool to write code for the gpu using full c# ide features

wise laurel
#

shh.... they'll just make us write for the cpu using hlsl

whole charm
analog sail
whole charm
#

But then you'll write the accompanying code in c# to issue draw commands

#

BRG allows you to utilize burst/jobs for culling tho

analog sail
#

Well I was thinking, incorrectly. I could use jobs and burst for shaders. My app is mostly shaders so far and they already put a heavy load on the Quest 2. So I was thiunking if I could write my own using jobs and burst it would be better, but I didn't realize about the GPU.

#

I thought shaders were hlsl code, that runs on the GPU

whole charm
#

Yea, you write shaders in HLSL and it gets compiled into assembly (depending on the platform and the rendering api - could be directx, vulkan, metal) for the gpu to execute

analog sail
#

And the code set colors of the materials

whole charm
#

Better to profile your quest 2 app and see what the bottle necks are

#

You can use the rendering debugger in URP

analog sail
#

I'm still learning to use the profiles, but have been doing that

whole charm
#

To see if it's a CPU or GPU bottleneck

analog sail
#

Have not looked at the debugger yet

stray shale