Skip to content

Instantly share code, notes, and snippets.

View XiaoPangxie732's full-sized avatar

XiaoPangxie732

View GitHub Profile
@burningtnt
burningtnt / TrustedLookupAccessor.java
Last active May 1, 2025 14:08
Access IMPL_LOOKUP without Unsafe
import java.lang.foreign.*;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
public final class TrustedLookupAccessor {
private TrustedLookupAccessor() {
}
private static final MethodHandles.Lookup INSTANCE = null;

我画的东西他妈的到底去哪里了?

在Event Browser内找到你要判定的draw call
如果难以找到,使用gl(Push/Pop)DebugLabel使用

顶点着色器工作是否符合预期?

  1. 在Texture View中选择Ouputs中要观察的Frame,然后将Overlay模式调节到Wirframe Mesh或HighLight Drawcall观察有无明显特征,如果有则判定测试通过即可
  2. MeshViewer中,选择Preivew中的Vs Out,将Contraols切换为Flycam,观察线框是否处于摄像机中,观察线框模型与绘制目标模型线框是否一致,多半是PoseStack的位置错了或者调用了没有使用matrix4f的pos方法
  3. 观察顶点属性输入数据是否符合预期,多用于判定附加了自定义顶点属性的情况
  4. 在PipeLine State中选择VTX,观察Vertex Attribute Foramts情况,问题种类极多,需要逐个判定index是否和attribute layout填写一致,是否enable,format是否正常,格式R16G16指代有两个数据,每个数据是16位宽,Buffer Slot,相同则代表从同一个buff中获取数据,然后观察Buffers,Element只在使用了DrawElement此类的drawCall时出现,里面的数据是顶点索引,stride指上下两个数据间的步长,offset指从buffer的哪个位置起可以读到第一个数据,Divisor指顶点属性除数,配合drawInstance系列使用,多半是0和1
@ChampionAsh5357
ChampionAsh5357 / 1192-1193-primer.md
Last active February 20, 2025 04:47
Minecraft 1.19.2 -> 1.19.3 Mod Migration Primer

Minecraft 1.19.2 -> 1.19.3 Mod Migration Primer

This is a high level, non-exhaustive overview on how to migrate your mod from 1.19.2 to 1.19.3 using Forge.

This primer is licensed under the Creative Commons Attribution 4.0 International, so feel free to use it as a reference and leave a link so that other readers can consume the primer.

If there's any incorrect or missing information, please leave a comment below. Thanks!

Feature Flags

@skyrising
skyrising / mojang-meta-urls.md
Last active June 3, 2025 15:25
Mojang Meta URLs
@ZekerZhayard
ZekerZhayard / 1.build.gradle
Last active February 14, 2022 19:20
build.gradle with Mixin for ForgeGradle 5+
// Without MixinGradle
// Add below contents to the end of your build.gradle
configurations {
library
implementation.extendsFrom library
}
repositories {
maven { url = "https://repo.spongepowered.org/repository/maven-public/" }
}
dependencies {