Git Product home page Git Product logo

hlsl2glslfork's Introduction

HLSL to GLSL shader language translator

DX9 style HLSL in, GLSL / GLSL ES out.

A continued development from ATI's HLSL2GLSL, with preprocessor code based on mojoshader. I'm changing it to make it work for Unity's use cases; might totally not work for yours!

For an opposite tool (GLSL ES to HLSL translator), look at Google's ANGLE.

See badly maintained change log.

Notes

  • Only Direct3D 9 style HLSL is supported. No Direct3D 10/11 "template like" syntax, no geometry/tesselation/compute shaders, no abstract interfaces.
  • Platform support:
    • Windows via Visual Studio 2010 (hlslang.sln).
    • Mac via Xcode 5 (hlslang.xcodeproj).
    • Other platforms may or might not work. Some people have contributed CMake build scripts, but I am not maintaining them.
  • On Windows, the library is built with _HAS_ITERATOR_DEBUGGING=0,_SECURE_SCL=0 defines, which affect MSVC's STL behavior. If this does not match defines in your application, totally strange things can start to happen!
  • The library is not currently thread-safe.

Status

Used in Unity and bitsquid engines, and some other studios -- seems to work quite ok.

Support for DX11 features might or might not get added due to the bad condition the original code is in (very obscure and inefficient), instead maybe a new cross-compiler will be made. Someday. Maybe.

No optimizations are performed on the generated GLSL, so it is expected that your platform will have a decent GLSL compiler. Or, use GLSL Optimizer, at Unity we use it to optimize shaders produced by HLSL2GLSL; gives a substantial performance boost on mobile platforms.

hlsl2glslfork's People

Contributors

aras-p avatar shaggie76 avatar mingwandroid avatar baldurk avatar zeux avatar anchsm avatar assaframan avatar rudybear avatar bitsquid avatar vladvlasov256 avatar unity3d-jens avatar joeante avatar jechter avatar joravainen avatar anteru avatar raymond-w-ko avatar computerquip avatar ingramb avatar todi1856 avatar

Watchers

James Cloos avatar Harschell 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.