Opencomputers: Compatibility with Shader Mod

Created on 8 Aug 2017  路  15Comments  路  Source: MightyPirates/OpenComputers

You read the title. This isn't a very important thing as it doesn't break anything.
When you got any shadow manipulating shader pack (every shader pack ever) the screen goes so dim it just barely can be seen or if any, it's like this even in a completely dark room. I was using KUDA Shaders for this particular screenshot:

oc shaders

bug-minor incompatibility

Most helpful comment

Made a PR, it's only one like but still 馃槀

All 15 comments

Yeah, that would be awesome to see things on screen with shaders!

There was a similar issue on the ComputerCraft issue tracker (dan200/ComputerCraft#534) which was fixed by dan200/ComputerCraft@b7950a4209ef8b50a73f2ba2be8bea9baa90c23a. Basically one adds a call to:

OpenGlHelper.setLightmapTextureCoords( OpenGlHelper.lightmapTexUnit, 0xFF, 0xFF );

at the same time as RenderState.disableLighting().

I don't know if this is the same root cause as CC's issue, and so cannot comment on if it'll actually solve anything for OC. It's an ugly (and rather flawed) workaround, but shaders seem to ignore every other hint you can drop about lighting.

For 1 second I thought about trying to fix it myself according to your suggestion @SquidDev , but I've never programmed in Java or made/edited Minecraft mods so sourcecode of OpenComputers looks a bit intimidating to me :-| I don't have a clue where to look.

After some experiments, I've also noticed that it's not happening with same intensity with all shader packs. With SEUS Renewed 1.0.0 it's very visible (screens are completely unreadable) but it doesn't seem to happen with newest Chocapic 13 V6 (here screens are nice and readable), and with Continuum the screens are half dimmed. Unfortunately, of them all SEUS is the prettiest by far...

https://github.com/MightyPirates/OpenComputers/blob/master-MC1.7.10/src/main/scala/li/cil/oc/client/renderer/tileentity/ScreenRenderer.scala
The could would probably have to be changed in here?
(sadly I don't have the time to setup a build environment, but this seems like the place, it has lots of opengl stuff here...)

Would really love a fix for this too, as i love shaders and will have to live with barely visible screens or maybe go to computercraft if it is not fixed. Hoping for a beta build or something!

I've been poking around a bit. Sadly I can't seem to setup a development environment due to annoying errors.

I got a development environment up and running for OpenComputers, want me to try it out?

That line fixed the lighting issue
2018-07-10_21 51 46

Running on 1.12.2 with Sildurs Vibrant Shaders v1.17 Extreme.
Will make a PR asap, need to see if it causes any harm

Does it work as intended at night, though?

@asiekierka It didn't on CC (monitors have a reddish tint), but I'm not sure that's possible to resolve. Shaders appear to ignore pretty much every lighting hint you throw at them, so this seemed the best work around.

It has indeed a little reddish tint in night.
Day:
2018-07-10_22 07 23
Night:
2018-07-10_22 07 39

Made a PR, it's only one like but still 馃槀

Looks great to me! Cheers!

I would really appreciate if this little change could be pushed to the public mod version =)
Thx for checking it out!

Was this page helpful?
0 / 5 - 0 ratings