irisshaders / iris Goto Github PK
View Code? Open in Web Editor NEWA modern shaders mod for Minecraft compatible with existing OptiFine shader packs
Home Page: https://irisshaders.dev
License: GNU Lesser General Public License v3.0
A modern shaders mod for Minecraft compatible with existing OptiFine shader packs
Home Page: https://irisshaders.dev
License: GNU Lesser General Public License v3.0
Hello there, first off, thanks for that great project, this might be exactly what I'm looking for!
I'd like to base my own WIP project, LightOverhaul, on your shader implementation, since I need shaders as well. In a nutshell, I'm working on colored lighting (that, unlike Albedo and others doesn't bleed through walls). One part is the lighting engine reworks which is part of my mod, the other part is a shaderpack that takes advantage of that color information.
Currently I'm working on a hacked version of Optifine, but for various reasons I'm not too happy with that...
For my mod to work, I need to add two attributes for each block - skylightRGB and blocklightRGB. Since I don't know too much about the shader pipeline, it would be very useful for me to see how mc_Entity is implemented. Then I could (hopefully) work in the two custom attributes for my mod as well.
First Question, would be willing to implement mc_Entity so I could base my work on that? That would be very much appreciated!
And second question, would you be willing to accept a pull request for those two custom attributes once I got my mod and API finished?
Many shaderpacks require this to work properly. They'll run without it, but things won't look right.
OptiFine/ShadersMod both allow shaderpacks to supply directives and configuration by declaring constants in the shader files. Here is an example: https://github.com/sp614x/optifine/blob/master/OptiFineDoc/doc/shaders.txt#L388
const float shadowDistance = 160.0f;
ShadersMod uses the following logic to locate that directive on each line:
const
literalfloat
literal
bool
, int
, vec4
, etc.shadowDistance
=
character-
), since these values can be negative.
character. There must be at least one digit for the directive to be valid.
const float shadowDistance = .;
as well but obviously that isn't valid. It's okay for Iris to ignore that case.f
), for example the f
in 160.0f
;
characterOf course, the above logic is tailored to float values. Boolean, integer, vec4, and other types directives will need slightly different logic.
The above logic could be implemented as a regular expression, however it is also possible to implement it without regex. It's possible that an implementation that doesn't use regex could be more readable and understandable.
"zip END header not found" isn't very clear, it's more useful to just say that the zip is corrupted and to tell the user to download it again.
Iris doesn't support the shadow pass at all currently. This causes minor rendering discrepancies with many shaders, including Sildur's.
The otherThings/light and dark shaders found here also have issues because shadow mapping isn't supported: https://www.dropbox.com/sh/bko0b0ctaovdwda/AACStbybl9uhCkP6TtFfFPIAa?dl=0&lst=
When using any shader pack, lighting will refuse to work correctly and will only show as vanilla lighting. I've tried all of sildurs shader packs yet none of them will work right.
I have yet to find out why, but I think it might be because of my NVIDIA card...? As looking at other issues I see people using AMD cards/apus with no problems.
Java 15
Using Minecraft 1.16.4
Fabric Loader 0.11.1
There are no other mods installed other than Iris
Also the multimc logs show a lot of errors: https://pastebin.com/RzQat5BN
I got deceived by a screenshot taken at sunset which made it look the lighting was working perfectly fine for someone else. Man im a little stupid sometimes. The real reason was because of the lack of shadow mapping support.
In a regular game, if i hit the mob it will turn red for a second, but with Iris (im running ./gradlew runclient) they don't turn red! This isn't a big issue, but still feels uncomfortable. This issue is happening with any shaderpack, even with (internal).
Can't record a video, but here is a screenshot =))))
There should probably be the Fabric API in the dependencies
Hi! I'm looking to build this project, but I don't quite get it.
When I run gradlew build
, I get this error :
FAILURE: Build failed with an exception.
What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelperTry:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.Get more help at https://help.gradle.org
BUILD FAILED in 809ms
See this fix: vram-guild/canvas@820bf75
Iris:
OptiFine:
What it's supposed to be like:
https://www.youtube.com/watch?v=F29dZnuPQwE&feature=emb_logo
It seems like the following option in shaders.properties
is the critical part:
frustum.culling = false
This is likely more of a Sildur's issue since it just flat out doesn't work at all on OptiFine, but on Iris it results in weird effects.
Should figure out what's going on
These execute before translucent rendering, and are for the most part just like composite passes.
Required by BSL.
On trunk they don't use the right render layer, and on my local testing branch making spider eyes render properly causes the rest of the spider to turn black.
This appears to result from the fact that the spider eyes renderer actually renders the whole spider model, but normally only the eyes part should show up.
This might be related to issues with transparency in general that I've noticed with faraway leaves as well.
When I face directly upwards, all blocks become black. The sky is not affected.
It happens with all the Slidur's packs except Enhanced Default. It does not happen with (internal)
shaders.
When my vertical angle is between -89.0 and -89.9, the world flickers when I look around.
It is completely black when I am facing directly upwards at -90.0.
Known issues:
ftransform()
is not properly replacedI know this isn't fully about Iris, but I hope you guys could tell me I should do in this situation. I pasted the issue I posted on the MultiMC Github here:
System Information
MultiMC version:
0.6.11-1430 on win 32 - MultiMC 5
Operating System:
Windows 10
Summary of the issue or suggestion:
MC Launches, Loads, and then right before the title screen fully shows it crashes
What should happen:
Obviously MC shouldn't crash
Steps to reproduce the issue (Add more if needed):
Suspected cause:
Iris or Sodium, but IDK (I know that it's not now, this is just the copied issue)
Logs/Screenshots:
Log
[Screeenshot](img.justpaste.me/i/20210107/kxV1z/Screenshot 2021-01-07 080827.jpg)
Now I know it's about AMD and atio6axx.dll or whatever, I just want to know what to do right now. Please help me if you can.
Related to a change in the return type of the methods on Buffer types
uniform float viewWidth; viewWidth
uniform float viewHeight; viewHeight
uniform float near; near viewing plane distance
uniform float far; far viewing plane distance
These uniforms should be easy to add and many basic shaders use them for DOF and other effects.
Hey, there,
I just discovered this project via this gist, and I have to say, I am very happy, that somebody is working on an alternative to Optifine.
Firstly, I just started up my client, and my first question is: How and do I have to put the shaders in a folder? Just extract the shader zip or copy the "shaders" folder out?
Next: Items/Player(s) aren't rendered correctly. The Player's hand is invisible, the Player iself and many items are kinda seethrough.
The red screenshot is from the Limbo (to demonstrate the translucency), don't ask me why.
The few seconds, it actually worked, I tried to use the Complementary shaders. - More or less as a joke.
After this I always get this fancy crash here: log.txt so I couldn't test any other shaders...
Thanks for this project!
Minecraft already calculates vertex normals for most geometry, but the vertex normals it calculates have some issues:
For finding these issues, the following shader files are useful:
gbuffers_textured.vsh
:
#version 120
varying vec4 color;
void main() {
gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
color = (vec4(gl_Normal, 1.0) + vec4(1.0, 1.0, 1.0, 1.0)) / 2.0;
}
gbuffers_textured.fsh
:
#version 120
varying vec4 color;
void main() {
gl_FragColor = color;
}
This messes up BSL because it appears to do SSR in gbuffers_water instead of in a composite pass, which doesn't work because SSR requires access to the content of the render targets.
From #42:
BTW, talking about fluids, Iris internal currently removes the vanilla effect of being submerged in fluids, not sure if that's known (although according to the debugger, that
applyFog
function is still called).
Minecraft renders block entities and regular entities substantially differently in 1.15+ compared to previous versions. As such, it's much harder to track exactly what entity is currently being rendered, since entities are often drawn to the screen whenever a different entity starts being rendered.
The reason for this is how VertexConsumerProvider.Immediate
works: with the exception of a few special render layers, whenever entity render layers are switched the content of the previous layer is immediately drawn to the screen.
It's unclear whether uniforms even work here anymore. Maybe attributes will need to be used? That would require some pretty hacky code changes to shaders however.
The vanilla CPU profiler doesn't tell the whole story. Especially in GPU-bound situations, it can be hard to tell how much time the GPU is spending on everything.
This is possible on OpenGL 2 and above using Query Objects.
Most shaderpacks require shadow mapping, but Iris doesn't support it. This should be implemented at some point.
Waypoint indicators render as a regular square when using Sodium and Iris together. I need to see if this can be reproduced without Sodium. I'm guessing that since we revert back to gbuffers_basic
for unknown content, that is what is causing the issue.
It would probably be helpful for developers trying to contribute to have a "checklist" issue with a list of things that are needed to be implemented and the ones that already are. That would allow them to know what to work on without having to look through the entire source to find those spots, or to see things needed in case they don't know what actually needs to be implemented.
Another option would be making an issue for each feature and then adding those to a Project, which could even be organized in categories like To do, In progress or Done. Projects can also take regular texts ("cards") that aren't linked to any issue, but having each as an issue (or PR) allows for a description, discussion, someone saying "working on it", or assigning them to users. Projects can also be automated, so things like closing those issues or merging the PRs can automatically move them to Done.
Maybe a mix of both (tracking issue with a list and then project with linked issues for started/considered "important" at the moment), in case you like Projects but don't want to have the issues tab filled (although that's what it is for, isn't it?).
Another way could also be cards for those that "don't need discussion (yet)", and asking to replace them with an issue/draft PR in case someone wants to work on them or discuss them.
Disclaimer: I don't know anything about shader code, and probably won't be able to contribute, but I may if I'm bored enough.
We've already have had multiple bugs pop up. Maybe its a good idea to have tests.
feat: loading custom shaders
no Idea how its done but I'm looking.
OptiFine supports block states (instead of just blocks) in block.properties, we should too. This causes a lot of logspam with Sildur's and similar packs otherwise.
It's not 100% clear how to make this work seamlessly, consider the following examples:
block.0 = minecraft:stone_slab[half=top]
block.1 = minecraft:stone_slab[half=bottom]
block.0 = minecraft:stone_slab
We'll need to support both cases, because sometimes shaderpacks choose to differentiate based on state and sometimes they do not depending on the given block.
The light moves when you move
You could create a discord server and a link to donate to support the project
this would be great
I know this isn't really an issue but I didn't know where to post it
The sky and clouds disappear and its black instead
I have noticed that there is not a build system in place. Since I will be using this mod personally, I added it to my jenkins server:
http://ci.josephworks.net/job/IrisShaders
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.