Giter Club home page Giter Club logo

bevy_plugin_pixelate's Introduction

Important

This is currently just a demo, and is using an old (0.12) version of Bevy! Take a look if you're interested, but don't expect to be able to install and use it.

bevy_pixelate_3d

Here are some examples of what the code does

screenshot all-meshes

screenshot lil-car

screenshot scene

fn setup_camera(
    mut commands: Commands,
) {
    commands.spawn((
        Camera3dBundle {
            camera_3d: Camera3d {
                clear_color: ClearColorConfig::Custom(
                    colors::SKY,
                ),
                ..default()
            },
            camera: Camera {
                // hdr: not required, but fun!
                hdr: true,
                ..default()
            },
            transform: Transform::from_translation(
                Vec3::new(0.0, 10.0, 15.0),
            )
            .looking_at(Vec3::new(0., 4., 0.), Vec3::Y),
            // I like TonyMcMapface
            tonemapping: bevy::core_pipeline::tonemapping::Tonemapping::TonyMcMapface,
            // Boosting the saturation can be interesting, but is not required
            color_grading: ColorGrading {
                post_saturation: 1.8,
                ..default()
            },
            projection: Projection::Orthographic(OrthographicProjection{
                scale: 0.1,
                ..default()
            }),
            ..default()
        },
        // depth prepass is required for pixelated.wgsl
        DepthPrepass,
        // normal prepass is required for pixelated.wgsl
        NormalPrepass,
        // PixelatedCamera causes this camera to be used to generate the
        // pixelated scene
        PixelatedCamera,
    ));
}
mut pixelated: ResMut<
    Assets<
        ExtendedMaterial<
            StandardMaterial,
            PixelatedExtension,
        >,
    >,
>,

Credits

  • assets/taxi is from Kenney's car-kit (Creative Commons CC0)
  • assets/parallax is from the Bevy repo and used in the Bevy parallax example
  • oklab functions are mentioned inline in the wgsl shader

bevy_plugin_pixelate's People

Contributors

christopherbiscardi avatar

Stargazers

Muhammad Ragib Hasin avatar YangYi avatar aubrey avatar Marcin Baszczewski avatar Jeff Carpenter avatar Moritz Mœller avatar Vincent Son avatar Colin avatar TheKnarf avatar Cooper Jax Reiff avatar Mário Feroldi avatar frans avatar bley avatar Christian Bartsch avatar Michel van der Hulst avatar Tim Irmler avatar Dmytro Banin avatar Simon Holm avatar Jax avatar Piotr Świercz avatar Enes avatar Trent avatar

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.