GithubHelp home page GithubHelp logo

codingeric / erics-magicavoxel-shaders Goto Github PK

View Code? Open in Web Editor NEW
203.0 10.0 20.0 7.99 MB

Shaders for MagicaVoxel including Terrain Generator, Game of Life, Waterflow Simulator, Advanced Flood System etc.

License: MIT License

magicavoxel shaders procedural-generation lifegame waterflow terrain noise terrain-generator erics-magicavoxel-shaders

erics-magicavoxel-shaders's Introduction

Eric's MagicaVoxel Shaders

aka EMVS.

Shaders for MagicaVoxel including Terrain Generator, Advanced Flood System etc.

Internationalization

( I am looking for new French Translations. )

Project Info

  • Current version: 59
  • Released under MIT License

Installation

Copy the .txt files from the shader directory in this project to the shader directory of your MagicaVoxel installation.

Compatibility

Version Is compatible Note
0.99.5 and before not compatible after EMVS version 55
0.99.5.1 and after all EMVS versions are compatible

Roadmap

  • Cloud generator
  • Tree randomizer.

Debugging

See this issue.

Shaders

Starting from version 55, EMVS no longer supports command execution. Please configure the relevant parameters through the graphical options provided by MagicaVoxel 0.99.5.1 onwards.

At the same time, for the graphical options are very clear, the explanations of parameters are not provided in this document.

Index

tergen

index

"tergen" is a 2d noise generator.

  • Set Air Color to -1, the voxel area without terrain will not be destroyed, but in the voxel area with terrain, the original voxel will be replaced by the new terrain.
  • Set Air Color to -2, all voxels that already exist in the scene will not be destroyed.

tergen2

index

"tergen2" is a modified version of "tergen", which creates terrain only above the existing voxels or selected area.

tergen3

index

"tergen3" is a modified version of "cave" but generates a 2d terrain map, which enables you to create noise animations using Time parameter.

cave

index

"cave" is a 3d noise generator.

Set Air Color to -1 to retain existing voxels.

flow

index

"flow" simulates the downflow of water in nature.

  • You may set Iteration value to a certain number to simplify the process.
  • The voxels with given index are water source, the shader would not automatically create them, you must attach them first.

flow2

index

"flow2" is a modified version of "flow", by keep executing it, you can fill an enclosed area well without overflowing to the outside.

  • You may set Iteration value to a certain number to simplify the process.
  • The voxels with given index are water source, you must attach them first.

project

index

"project" enables you to project a 2d plane onto the surface of 3d objects below it.

gol

index

"gol" is the voxel shader for Conway's Game of Life.

drop

index

"drop" moves the dangling voxel down one unit in a single execution.

erics-magicavoxel-shaders's People

Contributors

cloudripple avatar codingeric avatar papatangosierra avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

erics-magicavoxel-shaders's Issues

Compatibility issues running in GLSL 1.10 or lower

Basic Info

Tested MagicaVoxel Version: 0.99.2

GLSL version: 1.10

Behavior: Simply cannot execute

Target Platform: Linux wine, macOS and Windows with lower GLSL version.

Log

In fact all the shaders in this project cannot avoid the mentioned problem. The log below belongs to the Terrain Generator.

[Cmd] : xs : tergen 19260817 50 20 1
[Log] cache model
[Log] compute model
==== [GL:Shader] ====
0:19(10): warning: Float suffixes are invalid in GLSL 1.10
0:19(84): warning: Float suffixes are invalid in GLSL 1.10
0:24(75): warning: Float suffixes are invalid in GLSL 1.10
0:25(67): warning: Float suffixes are invalid in GLSL 1.10
0:26(24): warning: Float suffixes are invalid in GLSL 1.10
0:31(31): warning: Float suffixes are invalid in GLSL 1.10
0:49(33): warning: Float suffixes are invalid in GLSL 1.10
0:15(2): error: operator '%' is reserved in GLSL 1.10 (GLSL 1.30 or GLSL ES 3.00 required)
0:15(2): error: could not implicitly convert error to int
0:16(2): error: operator '%' is reserved in GLSL 1.10 (GLSL 1.30 or GLSL ES 3.00 required)
0:16(2): error: could not implicitly convert error to int
0:18(7): error: bit-wise operations are forbidden in GLSL 1.10 (GLSL 1.30 or GLSL ES 3.00 required)
0:18(7): error: bit-wise operations are forbidden in GLSL 1.10 (GLSL 1.30 or GLSL ES 3.00 required)
0:18(7): error: type mismatch
0:18(6): error: bit-wise operations are forbidden in GLSL 1.10 (GLSL 1.30 or GLSL ES 3.00 required)
0:19(22): error: bit-wise operations are forbidden in GLSL 1.10 (GLSL 1.30 or GLSL ES 3.00 required)
0:19(22): error: type mismatch
0:19(16): error: cannot construct `float' from a non-numeric data type
0:19(16): error: operands to arithmetic operators must be numeric
0:19(10): error: operands to arithmetic operators must be numeric
0:20(9): warning: `o' used uninitialized
0:31(11): error: could not implicitly convert operands to arithmetic operator
0:31(10): error: operands to arithmetic operators must be numeric
0:32(14): warning: `f' used uninitialized
0:32(12): error: could not implicitly convert operands to arithmetic operator
0:32(9): error: operands to arithmetic operators must be numeric
0:32(19): warning: `f' used uninitialized
0:32(9): error: operands to arithmetic operators must be numeric
0:32(2): error: `return' with wrong type error, in function `cosini' returning float
0:37(13): error: could not implicitly convert operands to arithmetic operator
0:39(13): error: could not implicitly convert operands to arithmetic operator
0:40(56): warning: `fraX' used uninitialized
0:41(60): warning: `fraX' used uninitialized
0:42(22): warning: `fraY' used uninitialized
0:48(13): error: no matching function for call to `pow(float, int)'; candidates are:
0:48(13): error: float pow(float, float)
0:48(13): error: vec2 pow(vec2, vec2)
0:48(13): error: vec3 pow(vec3, vec3)
0:48(13): error: vec4 pow(vec4, vec4)
0:49(16): warning: `freq' used uninitialized
0:49(23): warning: `freq' used uninitialized
0:49(29): error: no matching function for call to `pow(float, int)'; candidates are:
0:49(29): error: float pow(float, float)
0:49(29): error: vec2 pow(vec2, vec2)
0:49(29): error: vec3 pow(vec3, vec3)
0:49(29): error: vec4 pow(vec4, vec4)
0:49(9): error: operands to arithmetic operators must be numeric
0:49(2): error: operands to arithmetic operators must be numeric
0:49(2): error: could not implicitly convert error to float
0:55(17): error: could not implicitly convert operands to arithmetic operator
0:56(25): warning: `height' used uninitialized
0:56(44): error: operands of `==' must have the same type
[Error] cmd failed to parse parms: MV_CMD_VoxelShader

Fixing status

Now project tergen flow lifegame flow2 tergen2 cave drop cubefill shaders work in GLSL 1.10.

Make use of shader panel

As stated in the release notes of MagicaVoxel 0.99.5.1 - 6/5/2020 (https://ephtracy.github.io/)

`Voxel Shader panel

  • Can bind user defined arguments to the interface via comments. `

It would be nice to see the shaders make use of this panel.

Idea for a realistic flow

Simple one:
Water should be removed after movement to a new position

Example 2d:

x0x
xxx
xxx

=

xxx
x0x
xxx

while by using flow we would have 2 water blocks by now.

请问在win64位系统下应如何正确使用命令

这两个着色器,我分别在magicavoxel 0.99.42 0.98.2 0.99.6,在命令行输入用例代码都没有任何效果,能否告知如何正确使用,感激不尽;

project (3d object to 2d plane)
lifegame (A 2d cellular automaton)

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.