r/GraphicsProgramming • u/IdeaCrafter96 • Oct 19 '26
Question Looking for guidance on evaluating shader cost for procedural texture generation (research project)
I’m working on a research project where the goal is to take a real texture and generate a procedural material/shader that approximates it.
The system produces a node‑based procedural graph with tuned parameters, plus an optional fallback texture layer. The output is a GLSL/HLSL/WGSL shader that reconstructs the material.
The motivation is practical:
In multi‑region deployments and cloud gaming backends, moving fewer textures can reduce storage and distribution overhead.
But the trade‑off is shader cost — and that’s the part I’m trying to evaluate properly.
I’m trying to understand how to estimate the cost of a procedural material shader compared to using a fixed texture.
I need a reasonable way to judge when the procedural version becomes “too expensive,” and how people typically model or approximate that cost in real pipelines.
I’d really appreciate insight from graphics programmers who have experience with:
• analyzing or estimating shader cost
• comparing shader‑based materials vs texture‑based materials
• heuristics or rules‑of‑thumb used in production
• pitfalls when evaluating procedural materials
I’ll leave the link to the full proposal in the comments for anyone interested.
4
u/waramped Oct 19 '26
So, moving a texture over to ALU instead of memory will only benefit you if your bottleneck is bandwidth or latency. That's not overly common. But, as always, you will need to profile your shaders to know for sure. If you can approximate a texture in less execution time than it takes to roundtrip to memory, then it will overall be a win, but figuring that out is going to be very complicated, and will be different on different hardware.
The benefits of procedural textures are that you can analytically filter them to get better quality "mips", and even potentially reduce the instruction cost depending on the pixel footprint. (Don't need to add high frequency noise details if the texture would be reading from a very low mip, etc).
The downsides is that they are just generally slower than simply reading a texture from memory (but, profile first).
1
u/speps Oct 19 '26
The idea is good, but it only makes sense if you’re going to cache the result which would mean same VRAM cost as plain textures, maybe even more if you don’t recompress to a GPU tiled format. Something like Mega Texture (id Tech 5) for example, but procedural shader based, would be interesting. Evaluating it fully every frame would be wasteful and only needed if animated.
-2
u/IdeaCrafter96 Oct 19 '26
Here’s the full proposal for anyone interested in the technical details, architecture, and evaluation notes: https://github.com/IdeaCrafter96/texture-synthesis-ai
0
u/[deleted] Oct 21 '26
[deleted] — view deleted comment