- Java 99.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
Build / Build (push) Has been cancelled
This reverts commit
|
||
| .github | ||
| config/checkstyle | ||
| gradle/wrapper | ||
| libs | ||
| src/main | ||
| .gitignore | ||
| banner.png | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| NOTICE | ||
| README.md | ||
| settings.gradle | ||
Oculus for Cleanroom
Oculus adds Iris and OptiFine-format shader packs to Minecraft 1.12.2. Oculus 0.1-cleanroom.2 targets Cleanroom 0.7.16-alpha with Java 25 and the Forge 1.12.2 build of Celeritas 2.6.0-dev. Use the legacy Oculus 0.1-cleanroom.1 JAR for Celeritas 2.5.0-dev.
Place the built mod in the instance's minecraft/mods directory alongside Celeritas. Place shader packs in minecraft/shaderpacks and press O in-game to open the shader pack menu. K toggles shaders and R reloads them. Key bindings can be changed in Controls.
To save patched GLSL for debugging, add -Doculus.dumpPatchedShaders=true to the instance's Java arguments. Oculus writes the files to minecraft/patched_shaders.
Building
With JDK 25 on your path, run ./gradlew build. The installable JAR is build/libs/oculus-mc1.12.2-0.1-cleanroom.2.jar. Pass -PceleritasJar=/absolute/path/to/celeritas-2.6.0-dev.jar if the dependency is outside the default Prism instance path.
Changes from the pixelreyn backport
The comparison uses pixelreyn's Oculus 1.12.2 at commit 63205cc5, the revision recorded in this fork's NOTICE. Upstream revision
Cleanroom port and packaging
- Replaced the Forge 14.23.5.2860+ and Java 8 target with Cleanroom 0.7.16-alpha and Java 25. Declared Oculus client-side and made Celeritas 2.6.0-dev the required terrain renderer for Oculus 0.1-cleanroom.2. The upstream Vintagium JAR and vendored
sodium-1.12tree were dropped along with the upstream RLCraft mod list. - Moved the Gradle project from
Oculus/to the repository root. Switched from RetroFuturaGradle to CleanroomGradle, updated the wrapper to Gradle 9.8.1 and Shadow to 9.6.1, and added-PceleritasJarfor a local compile-time Celeritas JAR. - Replaced MixinBooter's early loader registration with manifest entries for the Oculus, batched entity rendering, and Celeritas mixins and the access transformer. Removed the Vintagium mixin configuration and the unused GL state accessor.
- Replaced the
glsl-relocatedsubproject with build-time shading and relocation of GLSL Transformer 1.0.1, ANTLR 4.10.1, JCPP, and Commons Collections. The default build reobfuscates the shaded JAR and includes the LICENSE and NOTICE. - Git ignores the root
releases/directory used to store local release JARs. - Ported OpenGL buffer calls, shader source uploads, and debug callback handling to LWJGL 3. Replaced the local memory utility with LWJGL's implementation and added explicit cleanup for native shader buffers and debug callbacks.
- Restored the older Oculus GitHub issue templates, funding metadata, and workflow files from the westernbear repository history. The workflows still reference the older build setup. GitHub metadata
Celeritas terrain integration
- Added Celeritas shader programs for solid terrain, translucent terrain, and terrain shadows. They bind Celeritas vertex attributes and region and section offsets, provide terrain matrices and samplers, and apply shader-pack alpha test overrides.
- Added an extended chunk vertex format with light coordinates, normals, block IDs, texture midpoints, tangents, and block-center offsets. Block IDs and material information follow quads through native meshing and through conversion from vanilla buffers, including nested fluid rendering.
- Use Celeritas 2.6.0-dev's primitive encoder and vertex layout directly. Preserve Celeritas's base vertex data while writing shader attributes. The legacy 0.1-cleanroom.1 binary retains the per-vertex encoder for 2.5.0-dev.
- Rebuild Celeritas meshes when shaders are reloaded or toggled. Cache terrain programs per pipeline and clean up programs when they are replaced or fail to link.
- Connected Celeritas's Shader Packs button to the Oculus shader pack screen and added its English label. Fixed a crash when releasing a slider rebuilt the settings list during mouse event handling.
World rendering and shader compatibility
-
Bind textures declared under
texture.deferredfor deferred passes, including MakeUp Ultra Fast's cloud noise. Deferred declarations take precedence over composite textures with the same sampler name. -
Select the shader pipeline for the active dimension, including the vanilla Overworld, Nether, and End identifiers. Resize screen-sized textures and update pass viewports when the game framebuffer changes size. Keep shader programs, frame counters, and persistent color buffers across resizes to avoid flashing in temporal passes.
-
Start deferred world rendering after camera setup, capture the camera matrices and fog color, and redraw the sky horizon when the pack supplies a sky shader.
-
Shader packs can set
oculus.usePackOverworldSky=trueto use their Overworld sky at all elevations with Galacticraft and AsmodeusCore. Draw the vanilla sun and moon on the pack’s configured sun path so their textures line up with shader lighting and glare. Mark Forge sky-provider draws with the custom sky render stage. Select the textured sky program for textured provider meshes and restore the basic sky program for star and atmosphere geometry. -
Extend the Galacticraft and AsmodeusCore Overworld sky projection when shaders are off so distant sky geometry stays visible. Fade the sky plane into the horizon fog before its edge comes into view. Restore the camera projection after the sky and cloud passes so Celeritas terrain and block entities such as chests use the same depth mapping.
-
Keep nearby blocks from clipping the first-person hand after Weather2 and CoroUtil draw precipitation. With shaders off, restore depth writes before Minecraft clears depth. With shaders active, keep world depth for the shader pack and scale the hand's projection depth.
-
Supply the optional
weather2Weathershader uniform with local wind, cloud cover and storm strength when a compatible Weather2 build is present. -
For packs with a dedicated hand shader, draw the solid first-person hand and items before translucent terrain so water and stained glass composite where they are visible. Restore standard alpha blending before drawing the hand so the base skin stays opaque and the sleeve respects the skin texture's alpha. Draw translucent held blocks and first-person overlays after the world pass, and keep the late hand pass for packs that use a fallback shader.
-
Write translucent terrain into the current depth texture while keeping the pre-translucent depth copy for effects such as Sildur’s water reflections.
-
Honor per-target blend directives in world and fullscreen passes, including Complementary's separate material buffers for water. Restore the previous blend state when each pass ends.
-
Translate legacy block material rules for snow layers, furnaces, redstone torches and leaves. Skip a rule when its remaining state filters cannot be matched on Minecraft 1.12.2.
-
Honor shader-pack gbuffer clear directives, including the fog-color default. Fully initialize new render targets, then reuse the per-frame clear passes. Run pack preparation after shadows and restore the world framebuffer and viewport before continuing.
-
Added MakeUp Ultra Fast compatibility uniforms for day and night blending, volumetric lighting, viewport size and aspect ratio, and the frame index.
-
Bind legacy lightmap samplers to Minecraft 1.12.2 texture unit 1 and supply the viewport, celestial, cloud and time-of-day uniforms declared by Vanilla Plus 2.3a.
-
Evaluate compound
program.<name>.enabledexpressions with boolean options, parentheses,!,&&, and||. Log invalid expressions and combine valid conditions with the programs disabled by the active profile. -
Copy pre-translucent and pre-hand depth only when a linked program samples
depthtex1ordepthtex2. Skip redundant active texture queries on the OpenGL direct-state-access path and keep Minecraft's tracked 2D texture binding in sync. -
Made patched GLSL dumps opt-in with
-Doculus.dumpPatchedShaders=true.
Shadows
- Keep shaders active in dimensions that sample shadow textures without drawing a shadow pass. Initialize and bind empty shadow maps on demand, and recognize empty vertex and fragment stages as placeholders. This covers the Nether paths in regular BSL v10.1.8 and Sildur’s Enhanced Default.
- Render terrain shadows through Celeritas's separate shadow section list, with camera-facing block face culling disabled for the shadow pass. Draw entity and block-entity shadows with the shader pack's compatibility program in place of the upstream hardcoded GLSL 110 shadow fallback.
- Initialize Minecraft's entity and block-entity renderers before the shadow pass so XP orbs can render on the first frame after entering a world.
- Write the pack's shadow color targets, capture opaque depth before drawing translucent terrain, and sample the separate depth and color textures for tinted shadows. Apply the pack's shadow alpha and blend settings, color clears, texture filters, and mipmap settings. Release both depth textures when the shadow targets are destroyed.
- Allocate a third shadow color buffer when the shadow pass requests it, including the sparse
DRAWBUFFERS:02declaration used by Sildur’s Enhanced Default. - Run shadow composite compute passes after shadow rendering and bind the shader pack's writable images. For BSL's optional colored lighting, supplement the 1.12 block table with the pack's color IDs while preserving its block categories.
- Cull shadow terrain by distance and, where appropriate, by the view frustum extruded toward the light.
shadow.culling=truerequests directional culling,falsekeeps distance-only culling, andreversedkeeps a nearby region defined byvoxelDistancewhile applying directional culling outside it. Perspective shadows use distance-only culling.
Entity materials and particles
- Load resource-pack
_nand_scompanion maps for entity textures loaded as simple textures. Bind the maps when the entity texture changes, supply neutral defaults for missing maps, and evict companion textures on deletion and resource reload. - Route lit and standard 1.12.2 particle draws through
gbuffers_particles, withgbuffers_textured_litas its fallback. Honorparticles.before.deferredand report the particle render stage to the pack. The render stage also tracks the active world and shadow passes.
The Cleanroom test instance verified red and blue stained-glass shadows with BSL, all three shadow culling modes, entity companion maps and their defaults, and particle ordering on both sides of the deferred pass. Particle testing covered vanilla batches. Custom mod particle renderers and frame-time gains remain unmeasured.
The line-by-line diff for committed changes compares the upstream Oculus/ tree with the root of this branch. The upstream revision must be present in the local Git repository.
git diff 63205cc5f6135285080e1cd0a2aa8668d97bf012:Oculus HEAD^{tree}