Skip to content

Add detection of problematic core shader resource packs#2043

Merged
jellysquid3 merged 13 commits into
CaffeineMC:devfrom
pajicadvance:wip2
Nov 12, 2023
Merged

Add detection of problematic core shader resource packs#2043
jellysquid3 merged 13 commits into
CaffeineMC:devfrom
pajicadvance:wip2

Conversation

@pajicadvance

@pajicadvance pajicadvance commented Aug 25, 2023

Copy link
Copy Markdown
Member

Sodium now scans all non-vanilla active resource packs for problematic shader files:

  • Resource packs which replace terrain core shaders are detected, and an error message is shown.
  • Resource packs which replace the default light.glsl and fog.glsl shaders are detected, and a warning is shown.
  • Detailed info on which resource pack replaces which file is printed in the client log.
  • The check is performed after the initial game launch, and after every resource reload.

Closes #1901.

@douira douira left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread src/main/java/me/jellysquid/mods/sodium/client/util/workarounds/InGameChecks.java Outdated
@PepperCode1

Copy link
Copy Markdown
Contributor

Is there a reason .fsh files are not checked? If a pack replaces them, it is also incompatible.

@pajicadvance pajicadvance marked this pull request as draft August 25, 2023 16:01
@pajicadvance pajicadvance marked this pull request as ready for review August 25, 2023 19:33
Comment thread src/main/java/me/jellysquid/mods/sodium/client/util/workarounds/InGameChecks.java Outdated
Comment thread src/main/java/me/jellysquid/mods/sodium/client/util/workarounds/InGameChecks.java Outdated
@jellysquid3 jellysquid3 added the T-enhancement Type: Enhancement label Aug 26, 2023
@jellysquid3 jellysquid3 self-assigned this Aug 26, 2023
@Leo40Git

Copy link
Copy Markdown
Contributor

Extremely minor nitpick: Why are you doing new ArrayList<>(Arrays.asList())?
Arrays.asList returns an immutable list, which is probably what you want for static final lists.

@Octol1ttle

Octol1ttle commented Aug 28, 2023

Copy link
Copy Markdown
Contributor

Should I make that the file extension is ignored so that changing .json files also triggers the warning?

And what about the clouds shader?

… field naming rules

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

@jellysquid3 jellysquid3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some minor style nitpicks, but this can be resolved in a future patch.

@jellysquid3 jellysquid3 merged commit 0e3a07c into CaffeineMC:dev Nov 12, 2023
@jellysquid3 jellysquid3 added the R-pending-release Resolution: Pending release label Dec 3, 2023
@jellysquid3 jellysquid3 removed the R-pending-release Resolution: Pending release label Dec 6, 2023
IMS212 pushed a commit to IMS212/sodium-fabric that referenced this pull request Aug 6, 2024
)

Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-enhancement Type: Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a warning when loading core shaders

6 participants