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

Create a ConfigureMainRenderTargetEvent for enabling stenciling, simplified(?) #1830

Draft
wants to merge 18 commits into
base: 1.21.x
Choose a base branch
from

Conversation

Technici4n
Copy link
Member

#1715, but without the ability to instantiate render targets that have stencil enabled but not depth. Also brought further simplifications from FiniteReality#1.

@neoforged-automation neoforged-automation bot added the 1.21.4 Targeted at Minecraft 1.21.4 label Jan 9, 2025
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jan 9, 2025

  • Publish PR to GitHub Packages

Last commit published: f62e41755b774e1496d70585d35307fb7ae567dd.

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 #1830' // https://github.com/neoforged/NeoForge/pull/1830
        url 'https://prmaven.neoforged.net/NeoForge/pr1830'
        content {
            includeModule('net.neoforged', 'neoforge')
            includeModule('net.neoforged', 'testframework')
        }
    }
}

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-pr1830.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr1830
cd NeoForge-pr1830
curl -L https://prmaven.neoforged.net/NeoForge/pr1830/net/neoforged/neoforge/21.4.68-beta-pr-1830-feature-depth-stenciling/mdk-pr1830.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.

this.window.setGuiScale((double)i);
if (this.screen != null) {
this.screen.resize(this, this.window.getGuiScaledWidth(), this.window.getGuiScaledHeight());
+ net.neoforged.neoforge.client.ClientHooks.resizeGuiLayers(this, this.window.getGuiScaledWidth(), this.window.getGuiScaledHeight());
}

RenderTarget rendertarget = this.getMainRenderTarget();
+ if (rendertarget != null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Matrix4f matrix4f = new Matrix4f().setOrtho(0.0F, (float)p_361423_, 0.0F, (float)p_362735_, 0.1F, 1000.0F);
Map<ResourceLocation, ResourceHandle<RenderTarget>> map = new HashMap<>(this.internalTargets.size() + this.externalTargets.size());

+ // Enable the depth and stencil buffers based on whether any external targets use them.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this patch is trying to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.4 Targeted at Minecraft 1.21.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants