Coder Social home page Coder Social logo

korender's Introduction

Korender korender

Maven Central Kotlin android windows linux

Kotlin Multiplatform 3D graphics rendering engine based on OpenGL / OpenGL ES.

Korender uses declarative approach that seamlessly integrates 3D viewport into Compose Multiplatform UI. Same Korender code runs on all supported platforms.

@Composable
fun App() = Korender {
  Frame {
    Camera(DefaultCamera(Vec3(0f, 5f, 30f), -1.z, 1.y))
    Pass {
      Sky(sky(FastCloud))
      Renderable(standart(FixedColor) { color = Green }, mesh = sphere(2f), transform = translate(-0.5f.y))
    }
    Pass {
      Screen(effect(Water), sky(FastCloud))
      Billboard(effect(Fire) { yscale = 10f; xscale = 2f }, position = 6.y, transparent = true)
      Gui {
        Filler()
        Text(text = "FPS ${frameInfo.avgFps}", height = 50,  color = Red, font = "/ubuntu.ttf", id = "fps")
      }
    }
  }
}

Korender

Korender is BETA - any APIs may change without notice.

Supported platforms

  • Desktop (Windows/Linux) - based on LWJGL
  • Android - based on OpenGL ES API

Features

  • Rendering opaque and transparent objects
  • Diffuse, specular and ambient lighting (directional light)
  • Projection shadow maps with percentage close soft shadows
  • Texturing:
    • uv mapped
    • triplanar
    • detail
  • Bump mapping
  • Predefined and custom meshes
  • Wavefront .obj model file loading
  • Billboards (sprites)
  • Batching (instancing)
  • Simple heightfield (terrain)
  • Textured or shader sky
  • On-screen basic GUI
  • Custom shaders support
  • Multi-pass rendering and screen-space shaders (filters)
  • Simple effects
    • smoke
    • fire
    • water

Quick start

or, create an application from scratch:

  • Generate a new KMP application using Kotlin Multiplatform Wizard. Select Android and Desktop platforms.
  • Add Korender dependency com.github.zakgof:korender:0.2.0
  • Add the above code to commonMain
  • Run on desktop: .\gradlew composeApp:run

Examples showcase app

Examples source code

Further reading

Explore the Korender Wiki

korender's People

Contributors

zakgof avatar

Stargazers

Art Shendrik avatar Andrii Bugaiov avatar

Watchers

 avatar  avatar

Forkers

tgsen

korender's Issues

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.