Giter VIP home page Giter VIP logo

ao-shader's People

Contributors

deathcap avatar mikolalysenko avatar pawsong avatar shama avatar

Stargazers

 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

ao-shader's Issues

Alpha transparency support

Is it possible to use semi-opaque textures with ao-shader? Trying to render this texture which has 70% opacity, alpha blended allowing you to see the blocks behind it when using three.js/voxel-engine:

screen shot 2014-04-05 at 11 20 12 pm

but with ao-mesher/ao-shader, the blocks are rendered fully opaque:

screen shot 2014-04-05 at 11 20 19 pm

even if I clear the 'opaque bit' for ao-mesher. The blocks below are visible when the camera clips through but there does not appear to be any alpha blending. I also tried enabling gl.blendFunc() and gl.enable(gl.BLEND), with no effect (example here, lake on the left), so I suspect ao-shader would also need to add support for this to work.

https://github.com/mikolalysenko/ao-shader/blob/master/lib/ao.fsh shows the fragment alpha channel is always 1.0:

if(color.w < 0.5) {
  discard;
}

gl_FragColor = vec4(color.xyz * light, 1.0);

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.