GithubHelp home page GithubHelp logo

acuity's People

Contributors

grondag avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

acuity's Issues

Request For Comments: Rendering API Spec

I'm porting my Acuity Rendering API to Fabric because it offers a flexible toolchain and I don't want to wait for the big rendering changes in 1.14. The revised APIs for runtime, pipeline management and block rendering are now draft complete, and I'd welcome feedback from the Fabric dev community while I work on the implementation.

Technical Summary Here

API spec here.

You will be able to handle most rendering scenarios that would normally require a BlockEntityRenderer by implementing BlockEntityVertexProvider on your block model. Custom shaders are entirely optional and would be unnecessary to implement mods similar to CTM or Chisels and Bits.

Note that Acuity is not a modeling library. It assumes you already have vertex data with fully baked texture coordinates. Exotic Matter has advanced modelling features but is not yet ported to Fabric and is not meant to be a public API.

The implementation will include a handler for the Fabric Dynamic model API when it is complete, but that API will not provide access to all the features exposed by Acuity. Other mod authors are welcome and encouraged to build model APIs or libraries on top of Acuity.

Note the implementation is still a horrible broken mess. Vertex formats and thus shaders are changing from 1.12 to provide richer options, and many other bits are being refactored or forced to change due to 1.14. A working build of block rendering will probably take a couple more weeks and I'll be tracking down lighting bugs for some time after that.

For an illustration of what will be possible with the API, look at my 1.12 volcano mod. I've also uploaded a few screenshots of multi-layer rendering from 1.12 builds below (using Exotic Matter for the models.). The blocks pictured are not yet released. (Need to port Acuity and Exotic Matter first...)

Skip cutout renders when mod is enabled

EntityRenderer.renderWorldPass() can be streamlined when Acuity is enabled by skipping the render layers for CUTOUT and CUTOUT nipped (and the associated texture state changes) because cutout is handled in the solid pass via the fragment shader.

Deferring until 1.13 because ASM is non-trivial (and ASM will be a redo in 1.13) and most of the time the overhead is < 0.5ms per frame. However with heavy transfer/command throughput (Pyroclasm) this can spike to several milliseconds in some frames. Avoiding these calls may help reduce frame rate variation.

Optimize terrain iteration

RenderGlobal.setupTerrain() performance during continuous high-volume chunk updates was improved by pre-computing and caching internal visibility information in each render chunk but the list of render infos in the view frustum is still rebuilt almost every frame. (Called "iteration" in profile results.)

The Mojang implementation isn't particularly slow or bad, but could probably squeeze a millisecond or two per frame out of it with simpler data structures, better LOR and/or more JIT-friendly code. Will be helpful for Pyroclasm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.