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

[Bug] 1.17 - Optifine custom shaders overriding vanilla resourcepack shaders #6391

Closed
LoneDev6 opened this issue Nov 17, 2021 · 7 comments
Closed

Comments

@LoneDev6
Copy link

Description of Issue

Seems Optifine is prioritizing its own shader system even if a shader is included in the resourcepack, this breaks functionality of some servers, mods and adventure maps which use vanilla shaders (remember that not everyone is using Optifine.)

In this case seems Optifine is overriding rendertype_armor_cutout_no_cull shader even if it's inside the resourcepack.

Steps to Reproduce

  1. install an Optifine shader which adds some lighting effects or similar.
  2. install this vanilla shader resourcepack https://github.com/LoneDev6/VanillaCustomArmors
  3. get one leather or normal armor and see its texture bugged because the VanillaCustomArmors shader is overridden by Optifine shader.

OptiFine Version

OptiFine HD U G9

Installation Method

mods folder

Fabric/Forge Version

Fabric

OptiFabric Version

OptiFabric-v1.11.20

Other Installed Mods

None

Prior Testing

If you've installed using Forge/Fabric:

  • Does this happen without other mods installed?
    • Only OptiFine, OptiFabric, and Fabric
  • Does this happen without any mods at all?
    • No
  • Does this happen in Vanilla without OptiFine?
    No
  • Have you tried using a binary search to find which mods cause this issue?
    Yes

Solutions

Just avoid loading a shader if it's already included in the resourcepack.

With Optifine and an Optifine custom shader

immagine

Without Optifine

immagine

@purejosh
Copy link

purejosh commented Feb 2, 2022

@sp614x this has been open for over 2 months and hasn't had a single comment on it. What's going on?

@LoneDev6
Copy link
Author

LoneDev6 commented Feb 3, 2022

I doubt this can be fixed if this works the same way Iris Shaders work: IrisShaders/Iris#1042 (comment)

I have another solution for this and will be implemented in the next weeks

@sp614x
Copy link
Owner

sp614x commented Feb 8, 2022

Vanilla shaders and OptiFine shaders can't be mixed together.
If the vanilla shader is overwritten then the geometry is probably rendered in a custom buffer or multiple buffers with custom format/projection/encoding/etc.
The shader packs can organize the rendering pipeline in many different ways and vanilla shaders couldn't know where they should write to and in which format.

@sp614x
Copy link
Owner

sp614x commented Feb 8, 2022

The OptiFine shaders don't overwrite single render types or vanilla shaders. Instead they use separate programs for different rendering tasks (blocks, entities, environment) regardless of the render types that those may be using.

@PystoyPlayer
Copy link

I doubt this can be fixed if this works the same way Iris Shaders work: IrisShaders/Iris#1042 (comment)

I have another solution for this and will be implemented in the next weeks

Personally, I have a bug without shaders either (but with OptiFine mod installed)
4B28014B-26EC-4451-85E6-146D0FAC473D

@bladeRR
Copy link

bladeRR commented Jun 1, 2023

any update?

@LoneDev6
Copy link
Author

LoneDev6 commented Jun 1, 2023

Developer of Optifine already answered.

Vanilla shaders and OptiFine shaders can't be mixed together.
If the vanilla shader is overwritten then the geometry is probably rendered in a custom buffer or multiple buffers with custom format/projection/encoding/etc.
The shader packs can organize the rendering pipeline in many different ways and vanilla shaders couldn't know where they should write to and in which format.

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

No branches or pull requests

6 participants