Posted May 3, 20223 yr I want to have a fog-of-war feature that classic RTS games have by darkening blocks (separate to their in-world brightness) which are out of range of the player to varying degrees: No change for in range, Medium dark for out of range but previously explored, Very dark/black for out of range and unexplored An example of what I mean from Starcraft would be this: https://blog.gemserk.com/wp-content/uploads/2018/08/SCScrnShot_082518_153611-1024x768.png I want this darkening to apply to ALL blocks in view of the camera (I have a top-down camera in my mod so it's not that many blocks) so I need a solution that is relatively low-performance. My immediately thought of course is shaders and texture packs, except as far as I know those cannot be applied conditionally from code. I also don't want to mess with block world brightness so that light sources can still be seen properly in the fog of war. EDIT: just found this page on the community wiki: https://forge.gemwire.uk/wiki/Tinted_Textures. Would it be possible to manipulate these tint textures to apply the darkening I need (preferably without impacting any original tinting conditions like grass blocks changing colour in specific biomes) Edited May 3, 20223 yr by SoLegendary tints?
May 4, 20223 yr On 5/3/2022 at 3:36 PM, SoLegendary said: Would it be possible to manipulate these tint textures to apply the darkening I need no, because most blocks don't have that. if you make a plant block, your model will likely consist of two parts: fixed color part (part that is not green: berries of flowers) and tinted part (texture will be gray but the game will make it match biome's shade of green). so, no.
May 5, 20223 yr Author Is there a way to conditionally apply shaders from code onto blocks? I saw this post doing something which could help me for entities Except it relies on the RenderLivingEvent event and I don't see any equivalent event for block rendering.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.