Closed coderbot16 closed 1 year ago
This would be incredibly helpful! This is part of the reason complementary blew up huge: They support a TON of custom dimensions like the Twilight forest.
At the very least, it'd be useful to have a uniform int that tells if there's a sun/moon as well as one for if the dimension has a roof. Instead of having to implement a dimension name detection in the shader, those are generally the only pieces of data needed to more accurately light the world.
I don't know about the technical feasibility of this, but I'll start poking around in data packs and the Optifine ShaderDoc to see if I can find anything that makes this feasible.
NOTE: I do know that compatibility is still the number one goal and this would be a HUGE workflow change, I'm just tossing my opinion out there.
The uniform idea would be really simple, but won't work in many cases sadly.
Darn, I was just hoping IRIS could access the new dimension data pack things that specify skylight/roof. Oh well
It can, I meant that it wouldn't be enough for most shaders.
OH I get it. Is there a uniform for it or is there a workaround way that you know of for detecting if a dimension has a skylight and/or roof? Thanks for the help
We can easily add it, it's more of a question of if it'd be actually useful to shader developers, which the answer is likely no.
I'd definitely find it super useful, it'd allow shaders to provide a decent stand-in visual estimate for data packs that use custom dimensions. I'm working on GravityShade right now, and it would be much simpler to add "if (hasSkyLight== 1) {...}" to light dimensions differently. It'd definitely beat making a "default" shader for custom dimensions that only has one method of lighting, or making duplicates of the files in world1/world-1/world# to support custom datapacks one at a time.
Just an added note: If this does end up being added, keeping the uniform names consistent with datapack options would nice. The shader-relevant datapack attributes are:
This could also help datapack developers make their datapack dimensions look closer to what they want with shaders.
Thanks, and let me know if I can help out at all! I appreciate the work you all are doing 👍
Done.
This is necessary for non vanilla dimension overrides to work at all on 1.16+. Integer identifiers are only a reliable way of naming dimensions on earlier versions, and are unstable on 1.16 and above.