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

More modularity in the Uber shader #203

Open
jayliu50 opened this issue Jan 13, 2024 · 1 comment
Open

More modularity in the Uber shader #203

jayliu50 opened this issue Jan 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jayliu50
Copy link

jayliu50 commented Jan 13, 2024

Describe the problem

I'm trying to implement a custom shader (adds elevation contour lines) that also leverages the clipping primitive, and it seems harder than it should be. The Uber shader is a monolith of code.

Describe the solution you'd like

Consider breaking up the hlsl into modules. Perhaps even modules could be leveraged by custom functions in shader graph. (That use out parameters.)

I should be able to include a module or subgraph that will make my shader clip the same way as the Uber shader (for example).

Describe alternatives you've considered

Better support for shader graph in general. Either subgraphs and custom functions or both. #34

Additional context

Caveat is I am rather new to hlsl and unfamiliar with best practices. If performance suffers from breaking out the code, I'd be curious to know exactly how much.

@Cameron-Micka
Copy link
Member

This is a great idea @jayliu50 - and very similar to #34 as you point out. I'm not sure when the team will have time to do this, but it's a direction I would like to take Graphics Tools now that URP is becoming more stablished.

For utilizing clipping primitives, you might be in luck that the clipping primitive methods are somewhat modular. You can find them here and there are some docs on advanced usage.

@Cameron-Micka Cameron-Micka added the enhancement New feature or request label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants