DawnTeamMC / UniversalOres

💎 Patches missing ores blocks to Minecraft.
https://dawnteammc.github.io/universal_ores
GNU Lesser General Public License v3.0
12 stars 4 forks source link

Universal Ores - Shader Emissives #26

Open PlayfulPiano opened 1 year ago

PlayfulPiano commented 1 year ago

Currently, the ores added through this mod do not function with Emissive Ore Lighting that is common with many shaderpacks. Since this mod just creates identical vanilla ore blocks but for different stone types, I wonder if it is possible to set it up so shaders can recognize ores from UO to be in the same category as vanilla ores.

For example, here's a comparison using the "Complimentary Reimagined" shaderpack: image

Here's a link to the main shader discord (7d link, shaderlabs) which is where you could probably ask around for more specific info: https://discord.gg/qsNgHPcA

MechanosG commented 1 year ago

Hello. I just happened to find this thread while looking up unrelated things. Figured I should add to the discussion.

First, the reason you're seeing vanilla ores, but not universal ores, having emissives applied, is because complimentary reimagined adds support one block at a time, rather than by ore tag. Aka, not all gold gets it.. only minecraft:gold_ore AFAIK. You can however, manually add more in the shader file. I personally am in the process of doing this for my modpack, and have successfully added emissives to most universal ores (and a bunch of other mods), although I "have" ran into some logic issues due to the way complimentary reimagined detects what colors should be emissive, and stone like basalt having a red tint. I'll need to attempt a more complex algorithm to separate copper ore's glowing bits, from the red basalt bits, if it's even possible (if too many colors are shared between copper and basalt, those colors will have to be excluded to prevent the basalt from glowing).

Second, resource packs can already add emissive textures to universal ores as well. To see an example of this, look at the "Better 3D Ores" and "Glowing Modded Ores V2" resource packs. The latter doesn't actually have Universal Ores support, but shows how to do it without changing the texture. The former has Universal Ores support, but also applies a custom material/model, so I thought the latter would be a better example. Doing it that way works completely fine with or without a shader, using a mod like Continuity, and doesn't run into the shared color issue, since it uses materials instead. That said.. Complimentary Reimagined defaults to general emissives being very bright. Lighter colored ores, such as Tin added from mythic metals or techreborn, will turn solid white, and other ores may just look too bright in general. Which is why adding emissives via CR itself, seems to be the better option, as it also gives control over the strength and color of the emission.

I have a related issue up over at CR's github if you happen to need more details.