Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.21.3] Add event fired at the start of the framegraph setup #1598

Open
wants to merge 5 commits into
base: 1.21.x
Choose a base branch
from

Conversation

XFactHD
Copy link
Member

@XFactHD XFactHD commented Oct 16, 2024

This PR adds events during the framegraph setup at the start of level rendering. These allow adding custom passes to the graph and enabling entity outline post-processing without any entities in view having active outlines.
The pre event is fired right after the "clear" pass is set up and the post event is fired right before the graph is executed.

Opening as a draft for now because I'm not totally sure whether the split into pre and post is actually useful or whether the pre event primarily for the outline stuff and people using mixins to precisely inject custom passes between vanilla passes is more suitable.

@XFactHD XFactHD added rendering Related to rendering 1.21.2 Targeted at Minecraft 1.21.2 labels Oct 16, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Oct 16, 2024

  • Publish PR to GitHub Packages

Last commit published: 8a902daa9bd0ff24807698f34604579c7fa3c63e.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #1598' // https://github.com/neoforged/NeoForge/pull/1598
        url 'https://prmaven.neoforged.net/NeoForge/pr1598'
        content {
            includeModule('net.neoforged', 'testframework')
            includeModule('net.neoforged', 'neoforge')
        }
    }
}

MDK installation

In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK bin folder on the path.
The script will clone the MDK in a folder named NeoForge-pr1598.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr1598
cd NeoForge-pr1598
curl -L https://prmaven.neoforged.net/NeoForge/pr1598/net/neoforged/neoforge/21.3.42-beta-pr-1598-frame_graph_setup_events/mdk-pr1598.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip

To test a production environment, you can download the installer from here.

@neoforged-automation
Copy link

@XFactHD, this pull request has conflicts, please resolve them for this PR to move forward.

…s and enabling entity outline post-processing
@Technici4n Technici4n deleted the branch neoforged:1.21.x October 22, 2024 16:31
@Technici4n Technici4n closed this Oct 22, 2024
@Technici4n Technici4n reopened this Oct 22, 2024
@Technici4n Technici4n changed the base branch from port/1.21.2 to 1.21.x October 22, 2024 16:43
@XFactHD XFactHD changed the title [1.21.2] Add events fired during framegraph setup [1.21.3] Add events fired during framegraph setup Nov 8, 2024
@XFactHD XFactHD added 1.21.3 Targeted at Minecraft 1.21.3 and removed 1.21.2 Targeted at Minecraft 1.21.2 labels Nov 8, 2024
@neoforged-automation
Copy link

@XFactHD, this pull request has conflicts, please resolve them for this PR to move forward.

@XFactHD XFactHD changed the title [1.21.3] Add events fired during framegraph setup [1.21.3] Add event fired at the start of the framegraph setup Nov 20, 2024
@XFactHD
Copy link
Member Author

XFactHD commented Nov 20, 2024

I've flattened the two events into a single one and moved it slightly earlier to fire it between vanilla setting up "global" resources and adding the frame passes. The event can primarily be used to set up custom resources such as RenderTargets and requesting entity outline processing independent of entities.

@XFactHD XFactHD marked this pull request as ready for review November 20, 2024 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.3 Targeted at Minecraft 1.21.3 rendering Related to rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants