Posted January 7, 20232 yr I've been playing around with how chunk rendering works, and found how to conditionally render specific chunks with this code: https://pastebin.com/5UzA0s1F This code prevents the rendering of all chunks outside of a 30 block radius around a specific mob type. However, my end goal is to just apply a shader to show those chunks are out of range, rather than just not render them at all - something simple like painting them all black or changing it to monochrome. I believe I'd have to write a fragment shader (.fsh) for this which I've done before but only in isolation, playing around with this editor here: https://patriciogonzalezvivo.github.io/glslEditor/. I am assuming here that the shader I write can get an input of the original colour of each pixel which I can then modify. Does Forge provide this compatibility and if so, how can I go about registering and applying the shader in code once it's been written? Also, I don't think I'm going worry about rendering entities or block entities in these "dark" chunks so hopefully that simplifies this. EDIT: nevermind, I found a solution that doesn't require shaders - since I just want to darken the chunks and not apply any complex effects, I realised I can just mixin ModelBlockRenderer and change the lightmap values. Edited January 8, 20232 yr by SoLegendary
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.