Giter Club home page Giter Club logo

wgpu-sky-rendering's Introduction

wgpu-sky-rendering

A tiny example to show how to render allsky projections using wgpu-rs. Allsky projections are used in many ways to represented the earth/sky. This method does the projection per-pixel and runs in realtime.

Aitoff projection rendering of the sky

Supported projections are:

See this link for information about map projections.

How it works

If you want more precision about the algorithm and techniques used:

  • Read this article I wrote on my personal blog.
  • See my talk at ADASS 2020 at this link.

Usage

Play with the left and right keys to change the current projection.

From Source

# Clone the repo
$ git clone https://github.com/bmatthieu3/wgpu-sky-rendering.git
$ cd wgpu-sky-rendering

# Compile
$ cargo build --release

# Run
$ cargo run --release

wgpu-sky-rendering's People

Contributors

bmatthieu3 avatar

Stargazers

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

Watchers

 avatar  avatar

wgpu-sky-rendering's Issues

ShaderC Dependency Fail

error: build failed
[tommhnsn@localhost-live wgpu-sky-rendering]$ cargo build --release
   Compiling shaderc-sys v0.7.4
   Compiling wgpu-core v0.8.1
The following warnings were emitted during compilation:

warning: shaderc: searching for native shaderc libraries on system;  use '--features build-from-source' to force building from source code
warning: shaderc: cannot find native shaderc library on system; falling back to build from source

error: failed to run custom build command for `shaderc-sys v0.7.4`

Caused by:
  process didn't exit successfully: `/home/tommhnsn/wgpu-sky-rendering/target/release/build/shaderc-sys-1f2687a78223af66/build-script-build` (exit status: 101)
  --- stdout
  cargo:warning=shaderc: searching for native shaderc libraries on system;  use '--features build-from-source' to force building from source code
  cargo:warning=shaderc: cannot find native shaderc library on system; falling back to build from source
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/home/tommhnsn/.cargo/registry/src/github.com-1ecc6299db9ec823/shaderc-sys-0.7.4/build" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" "-DENABLE_SPVREMAPPER=OFF" "-DENABLE_GLSLANG_BINARIES=OFF" "-DSHADERC_SKIP_TESTS=ON" "-DSPIRV_SKIP_EXECUTABLES=ON" "-DSPIRV_WERROR=OFF" "-DCMAKE_INSTALL_PREFIX=/home/tommhnsn/wgpu-sky-rendering/target/release/build/shaderc-sys-4a56fff859d2178d/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
  -- The CXX compiler identification is unknown
  -- Configuring incomplete, errors occurred!
  See also "/home/tommhnsn/wgpu-sky-rendering/target/release/build/shaderc-sys-4a56fff859d2178d/out/build/CMakeFiles/CMakeOutput.log".
  See also "/home/tommhnsn/wgpu-sky-rendering/target/release/build/shaderc-sys-4a56fff859d2178d/out/build/CMakeFiles/CMakeError.log".

  --- stderr
  CMake Error at CMakeLists.txt:8 (project):
    The CMAKE_CXX_COMPILER:

      c++

    is not a full path and was not found in the PATH.

    Tell CMake where to find the compiler by setting either the environment
    variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.


  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/tommhnsn/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

I am unable to build due to a ShaderC dependency. I tried various avenues to fix it to no avail. Fedora 36

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.