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

VideoCommon: add material asset #12024

Merged
merged 1 commit into from Jul 9, 2023

Conversation

iwubcode
Copy link
Contributor

@iwubcode iwubcode commented Jul 3, 2023

This is the last of my asset reviews (for now!). This adds a material asset for pixel shaders. As I mentioned in my shader asset review, a material provides the data for a shader. Any shader input values will be in the material asset. This makes shaders reusable. Ex: you can have a single shader that might draw an outline around an object with an exposed color, one material that says to make the outline red and another that says to make the outline blue.

At the moment, materials are very simple. The only input is a named texture asset. In the future, materials will also handle other forms of data (color, integers, booleans, etc) that will be passed to the runtime shader as uniforms.

In the short term, this will be used by the revamped #11300 .

…ics engines where it provides data to be used in conjunction with a shader asset to generate a runtime AbstractShader
@AdmiralCurtiss AdmiralCurtiss merged commit fe8a9ac into dolphin-emu:master Jul 9, 2023
11 checks passed
@iwubcode iwubcode deleted the material_asset branch July 9, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants