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

Add Quality modifier to provide load masks #358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Jan 28, 2023

This allows Age builder control over what quality levels objects are rendered at. This does not (yet) automatically hook up load masks for things like wavesets or grass shader mods, but provides a general quality modifier.

Screenshot from 2023-01-28 00-09-35

Related to #356.

This allows Age builder control over what quality levels objects are
rendered at. This does not (yet) automatically hook up load masks for
things like wavesets or grass shader mods, but provides a general
quality modifier.
@Hoikas
Copy link
Member

Hoikas commented Jan 28, 2023

Thanks for getting started on this. The load mask stuff is used in many, many places, so it would be very nice to see the two parts of the load mask (quality and capability) split out into different parts for us to use both in terms of the UI/properties and the exporting thereof. Also, I feel like one of those boxes should have checkmarks for the hardware's shader model level instead of quality markings.

EDIT: I see that you did split that out. Maybe just move it to somewhere more easily accessible than the modifiers module? :)

@dpogue
Copy link
Member Author

dpogue commented Jan 28, 2023

Also, I feel like one of those boxes should have checkmarks for the hardware's shader model level instead of quality markings.

So, it turns out plLoadMask doesn't actually support this. It's only "if any shaders are supported" or "if no shaders are supported". There are comments hinting that it was intended to be expanded to handle that case, but we can't (easily) do that now without breaking binary compatibility.

Rather than being a modifier, you'd rather this be always visible on every object, such as in the "Plasma object" panel?

@Hoikas
Copy link
Member

Hoikas commented Jan 28, 2023

Hmmm... It sure seems like plLoadMask::ComputeRepMasks() is accepting a shader capability level 😕

@Hoikas
Copy link
Member

Hoikas commented Feb 26, 2023

I've been thinking on an off about this a bit, and I think that, considering we really don't have fine grained control over what kind of hardware is being targeted, it doesn't really make sense to expose the dichotomy of whether or not the player's GPU supports shaders or not. All GPUs released in the last 15 years support shaders, so that's not a very useful yardstick. The reason why we care about shader support or not, from what I understand, is to ensure that things like wavesets and grass shaders don't display on systems that don't support them and instead show a fallback. This is, to my mind, an implementation detail, so we should probably hide that from the artist. I'm thinking that modifiers should tell Korman that they are exporting shaders, and modifiers that export shaders should accept an "alternative object(s)" parameter, which might be exposed here on the quality modifier. In this way, we can intelligently export the with/without shader bits without troubling the artist with a distinction that means nothing to them.

@Deledrius
Copy link
Member

I think that makes a lot of sense, and feels very Kormanic.

@dpogue
Copy link
Member Author

dpogue commented Feb 28, 2023

So, in that case, we'd just want 4 checkboxes for quality levels?

As for automatically adding shader load masks, I think GrassShaderMod is the easiest where the loadmask can just go on the modifier, and leave the rest of the object as-is for display. Wavesets will be more difficult and involve picking an alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants