microsoft / microsoft/MixedReality-GraphicsTools-Unity

More modularity in the Uber shader

Open
#203 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
209
Forks
49
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Uber shader and reviewing how its HLSL handles the clipping primitive. Compare that structure with the shader graph, subgraph, and custom-function possibilities mentioned in the issue. Done would mean a documented modular approach for reusing clipping behavior, with any performance impact evaluated.

Written by the indexing model from the issue text.

Assessment

Tech stack
unity
Domain
computer-graphics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.