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

Floodfill incorrect shadows on most custom block models #286

Open
DanLCD opened this issue Aug 26, 2024 · 5 comments
Open

Floodfill incorrect shadows on most custom block models #286

DanLCD opened this issue Aug 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@DanLCD
Copy link

DanLCD commented Aug 26, 2024

Describe the bug

With Floodfill turned off, custom blocks that are not a full block model render correctly and as expected.
Floodfill off
However, when turned on and under artificial light (not sunlight), these blocks begin to almost completely darken up inward, leading to some rather annoying visuals.
Floodfill on
Some vanilla models appear to be unaffected by this phenomenon, as are these two pots:
Decorated Pot & Flower Pot with Floodfill on
Some others, however, are subject to it. Redstone dust, for example:
Redstone dust with Floodfill on
Although it is mainly noticeable with blocks from other mods.
Blocks affected and unaffected by this
This only happens with artificial lighting, however, as the blocks are unaffected under sunlight.
Redstone dust under sunlight
Custom block (from Macaw's Holidays) under sunlight
It is not a matter of lighting either, as even if the blocks get a light source next to them the problem persists. Only handheld lights manage to get rid of it.
Lit redstone lamp with Floodfill on
Torch placed with Floodfill on
Handheld torch with Floodfill on

Describe how your minecraft is set up

2024-08-26_12 52 51

  • What GPU vendor you are using: Nvidia
  • What operating system you are using: Windows 11
  • What minecraft version you are playing: 1.21
  • If you are using a special client for minecraft: No
  • What shader loading mod you are using: Iris
  • What version of the shader you are using: Bliss Shader Main
  • If you are using any, what additional mods you are using besides the ones required to use the shader:
    • Distant Horizons
    • MrCrayfish's Furniture Mod: Refurbished
    • Valhelsia Furniture
    • Blockus
    • Chipped
    • Macaw's Holidays
    • Macaw's Doors
    • Light Emitting Diode

Describe how to reproduce the bug

Turn Floodfill on with everything else in default. Place any block that isn't a full-block model in a space without sunlight and with another placed light source.

@DanLCD DanLCD added the bug Something isn't working label Aug 26, 2024
@DanLCD
Copy link
Author

DanLCD commented Aug 26, 2024

Related: #235 #228 #201 #170

@DanLCD
Copy link
Author

DanLCD commented Aug 26, 2024

Would love to see this getting resolved, as these shaders along with Floodlight are such eye candy :)
2024-08-26_15 46 13
(this spotlight effect comes from usage of a lvl 0 Light block from vanilla, discovered this accidentally but in retrospective it seems relevant to this issue now lol)
2024-08-26_15 47 31
2024-08-26_15 49 25

@X0nk
Copy link
Owner

X0nk commented Aug 26, 2024

To give a little bit of context; for the whole floodfill effect to work, it needs to know what blocks are where, relative to the world.
the shader loader mod (iris/optifine) does not give this information at all, so the shader has to find that data all it by itself. I'm sure you don't want to hear a lengthy explanation of 3d voxel space meticulously checking for something or nothing within the world, so i will just cut to the end

The shader has to manually list what blocks are light sources, and if a block should not block light.
by default everything except air, is automatically a light blocking thing. Otherwise, the shader would need to manually list all things that should block light. that list is... significantly larger, so that's never gonna happen.

to stop specific blocks from blocking light, you need to manually add those blocks to the list of blocks that should not block light

  • inside the shader, there is a block.properties file. the path is bliss-shader-main/shaders/block.properties
  • look for a list labeled as block.50
  • add the block IDs of the blocks you want to let light pass through to that list.
    note: there CANNOT be duplicate listings of a single ID, so make sure the ID you list is nowhere else in the entire file.

One other thing, the "voxel space" or 3D grid of the world is atleast 1x1x1 meter/1 block in volume for each grid unit. model shape does not exist in that voxel space. only the voxel shape exists. and that shape is 1 block large. So things that block light, but have had their model changed to be less than 1 block large, will still block light as if its 1 block large, regardless of what the model is.

Repository owner deleted a comment from vineet1401 Aug 27, 2024
@IMoist
Copy link

IMoist commented Sep 1, 2024

Related: #235 #228 #201 #170

and #291

@X0nk
Copy link
Owner

X0nk commented Sep 1, 2024

yes, all of those are the same issue. some of them have been cleared away simply by putting block ID's in the groups that best fit them, like i explained above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
@DanLCD @X0nk @IMoist and others