lambda icon indicating copy to clipboard operation
lambda copied to clipboard

Optifine shaders compatibility

Open omninope opened this issue 3 years ago • 11 comments

Is your feature request related to a problem? Please describe. Using optifine shaders with Lambda's rendering modules causes a lot of problems, in general they stop rendering or render very buggy.

Describe the solution you'd like Compatibility with Optifine shaders, so the user can have nice(r) graphics while still being able to see where things are.

Describe alternatives you've considered Other mods?

Additional context This is a ~~very useful and extremelly important~~ cosmetic feature for anyone that likes to use shaders. I know it sounds a little too much work for little reward but if you play with it you don't want to stop.

An example just because yes: 2021-05-04_01 03 25

omninope avatar May 04 '21 04:05 omninope

The new label doesn't fit

Natan515 avatar May 04 '21 04:05 Natan515

Well, in my mind it's a new feature, since Optifine shaders compatibility currently doesn't exist, that is why I used new, but feel free to change to whatever you think fits it best, the important part is the issue itself anyways :)

omninope avatar May 04 '21 04:05 omninope

I don't have this permission (:

Natan515 avatar May 04 '21 04:05 Natan515

Thanks for reporting your issue. We will try to do so. Did u try multiple shader? and also what shader are you using?

Avanatiker avatar May 04 '21 05:05 Avanatiker

The shaders tested where BSL, SEUS, SEUS PTGI, Sidurs, MrMeeps and probably others I forgot, but is all honesty I think every single shader in the world will break the rendering. You can actually make literally EVERYTHING compatible by making your render3D event or whatever it's called using a mixin on EntityRenderer injecting at @Inject(method = "renderWorldPass", at = @At(value = "INVOKE", target = "net/minecraft/client/renderer/GlStateManager.clear(I)V", ordinal = 1, shift = At.Shift.AFTER)). Now, why I didn't just open a pr to do that? Well I'm lazy for one, don't know kotlin only java, and i took that from Future so it's kind of a "skid".

omninope avatar May 04 '21 05:05 omninope

Mixins are only in java lol

czho avatar May 04 '21 13:05 czho

The shaders tested where BSL, SEUS, SEUS PTGI, Sidurs, MrMeeps and probably others I forgot, but is all honesty I think every single shader in the world will break the rendering. You can actually make literally EVERYTHING compatible by making your render3D event or whatever it's called using a mixin on EntityRenderer injecting at @Inject(method = "renderWorldPass", at = @At(value = "INVOKE", target = "net/minecraft/client/renderer/GlStateManager.clear(I)V", ordinal = 1, shift = At.Shift.AFTER)). Now, why I didn't just open a pr to do that? Well I'm lazy for one, don't know kotlin only java, and i took that from Future so it's kind of a "skid".

GlStateManager.clear(256); will clears the depth buffer and breaks the through wall rendering, making everything renders through wall.

Luna5ama avatar May 05 '21 05:05 Luna5ama

Mixins are only in java lol

Yes, I know, but the entire event system isn't, and I would need to know how the event system works so I can post an rendering event in the mixin, remove where it is right now and test everything.

GlStateManager.clear(256); will clears the depth buffer and breaks the through wall rendering, making everything renders through wall.

Sorry but I was unable to understand your comment. Do you mean injecting where I said breaks rendering (everything render trough walls)?. The image I posted when opening the issue is exactly what I described and I didn't encounter this problem.

omninope avatar May 11 '21 03:05 omninope

Mixins are only in java lol

Yes, I know, but the entire event system isn't, and I would need to know how the event system works so I can post an rendering event in the mixin, remove where it is right now and test everything.

GlStateManager.clear(256); will clears the depth buffer and breaks the through wall rendering, making everything renders through wall.

Sorry but I was unable to understand your comment. Do you mean injecting where I said breaks rendering (everything render trough walls)?. The image I posted when opening the issue is exactly what I described and I didn't encounter this problem.

GlStateManager.clear(256); 256 is the gl depth buffer bit. Depth(z) is the value being used to calculate an object is on the front (cover everything else) or on the back (being covered by others). Some module like Breadcrumbs, SelectionHighlight have setting to not render through walls. And those were relied on the depth buffer. So moving the 3d render event after clearing the depth buffer will break those and cause them to render through wall even the setting is off. Not really big deal but still an issue.

The bigger problem is the shader esp doesn't seem to work correctly after that.

Luna5ama avatar May 11 '21 03:05 Luna5ama

Oh, ok I understand now, thanks for explaining.

omninope avatar May 11 '21 03:05 omninope

I can confirm there are issues with Optifine shaders on Lambda client. The client freezes forever when I try to apply a shader while in-game, and if I enable a shader and then join a game, it just shows a black screen with the Lambda Client GUI. This issue seems to be in both the latest release and the latest source code.

ASOwnerYT avatar Oct 27 '21 02:10 ASOwnerYT