Giter VIP home page Giter VIP logo

lava's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

meowboy326

lava's Issues

Material: shader introspection

Shader definition proposal:

geometry in vec2 uv;

// Input for the material, only usable in geometry()
uniform material = {
    vec4 color = vec4(1, 1, 1, 1);
    sampler2d diffuseMap = "white";
};

// Only data that is shared between geometry (writing it),
// and epiphany (reading it).
// Keep this as small as possible for better performances.
buffer node = {
    vec4 color;
};

// Return whether the fragment should be considered as translucent.
bool geometry() {
    node.color = material.color * texture(material.diffuseMap, uv);
    return node.color.a < 1.0;
}

// "epiphany in" contening light information

// Return the final composed color.
// This operation should be way more costly than the geometry one.
vec4 epiphany() {
    return node.color;
}

Magma usage:

magma::RenderEngine engine;
engine.registerMaterialFromFile("material-name", "shader.shmag");

auto& texture = engine.make<Texture>("diffuse-map.jpg");
auto& material = engine.make<Material>("material-name");
material.set("color", glm::vec4(1, 0, 0, 1));
material.set("diffuseMap", texture);

VR: Stereo renderer

Currently, we are drawing the scene twice, but we could make it so that it generates both eyes in one rendering pass.

Clarify axes conventions

Everything is messed up so far, be clear about the convention.

Go for a right-handed, z-up world coordinate system.
X forward.

coordinates-system

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.