Skip to content

Compatibility with (my own) custom renderers #59

@zabijakmensin

Description

@zabijakmensin

Hello,

I’m developing a physics mod using PhysX JNI. To render physics actors, I register a WorldRenderEvents.AFTER_ENTITIES listener, iterate through all actors, and submit their geometry to the entityCutoutNoCull() RenderLayer (using the BufferBuilder from the WorldRenderContext). This works fine - the actors render correctly, and lights themselves render as expected.

However, I'm running into an issue where Veil’s lights don’t interact with my physics actors at all. Light passes through them completely - no shading, no occlusion, nothing - unlike Minecraft’s entities or blocks, which the light renderer interacts normally with as expected.

I’m assuming this happens because Veil doesn’t know my geometry exists - since I’m just manually pushing vertices and not registering anything in its pipeline. Is there a way to make Veil “aware” of my objects so that lighting affects them properly? Or is there a workaround to integrate custom geometry like this into its lighting system?

For context, my physics actors are completely separate from Minecraft's Entity or EntityRenderer<?> classes - they’re standalone objects with their own renderer logic.

I’m using Fabric 1.21.1 and Veil 1.0.0.234. I also have 0 experience with shader/light pipelines in general, so apologies if I’m missing something obvious.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions