lumien231 / Hardcore-Darkness

Minecraft mod that removes minimum light
17 stars 15 forks source link

Render Issue #5

Open givemhell opened 9 years ago

givemhell commented 9 years ago

it seems there is an issue with rendering forge microblocks and other blocks that are not whole blocks at night http://i.imgur.com/V9So2rT.png <-- night http://i.imgur.com/MEKH6LW.png <-- day

this problem does not happen when hardcore darkness or colored lights core is removed from my mods folder

givemhell commented 9 years ago

@lumien231 do you plan on doing something about this? or at least acknowledging the problem?

lumien231 commented 9 years ago

If i find out what causes it i will fix it :P.

givemhell commented 9 years ago

it also seems to affect carpender blocks, i would think its got something todo with how light is calculated. are you accounting for blocks like slabs and how light works with them?

lumien231 commented 9 years ago

You see i'm not accounting for anything^^. I really am just editing the vanilla lightmap to not have that minimal light.

givemhell commented 9 years ago

lets see what CptSpaceToaster has to say on this, he should be able to shed some "light" on this

if your feeling adventuress take a look here & see if this helps you get any ideas on how you might go about solving the problem https://github.com/CptSpaceToaster/CptsModdingLight/issues/36

the source of the mod can be found here https://github.com/CptSpaceToaster/CptsModdingLight/

lumien231 commented 9 years ago

Considering this happens with FMP and not Colored Lights or Dynamic Lights or whatever i'm not sure how that issue is related?

givemhell commented 9 years ago

this should make more sense, im really bad at explaining things >.<

Colored Lights core changes vanilla light system Hardcore Darkness hooks the vanilla light system thats been changed Blocks from random mods render with a shade of blue during the night

does that make more sense?

lumien231 commented 9 years ago

Lulz, you should have maybe mentioned Colored Lights Core considering THAT is the mod that is causing this together with Hardcore Darkness.

givemhell commented 9 years ago

yeah i swore that i removed it during the test but i guess i removed it from the wrong pack,

CptSpaceToaster commented 9 years ago

So, I replaced the lighting engine with my own, but it's backwards compatible... I don't think that's being discussed here. To make sure we're on the same page:

1.) Does hardcore darkness mess with the lighting engine in such a way, that light spreads differently? (y/n) 2.) Does Sunlight still spread around? (y/n) 3.) Does block light still flood-out like vanilla? (y/n)

Those 3 will help diagnose what's going wrong here. Now let's talk about how things are drawn.

The second thing I did, was replace the lightmap with a shader...... This change is not 100% backwards compatible, and quite a bother. This document details the change I made, and can help explain why things turn blue (in format 2)

4.) What does Hardcore darkness change in the rendering pipeline? (Just the lightmap's contents?)

If it's strictly editing the lightmap... it's going to be successful, but the change won't have much meaning... I guess I could hack in a check for hardcore darkness, and then change what I do to emulate hardcore darkness... which is kinda hilarious... but it would work.

If you're too busy to respond, that's fine, I'll go mess with your source if I need to. Right now, I've got other things to fix, but this is on the list. A couple people have asked for it.

Edit: If it's really just messing with sunlight... I can probably extend the world.sunLight color field out to the API, which would make your end... one line of code (and the API)... So you can just color sunlight black.

Edit Edit: Nope, you couldn't use sunlight to do this... you need to see in the day... that was dumb of me.

lumien231 commented 9 years ago

I'm just removing all of the "*0.8F+0.2F" type of calculations in getSunBrightnessBody and EntityRenderer.updateLightmap, i don't change anything else.

CptSpaceToaster commented 9 years ago

yep... that logic will simply be thrown out the window... I'll have to figure something out on my end.