ebruneton / precomputed_atmospheric_scattering

This project provides a new implementation of our EGSR 2008 paper "Precomputed Atmospheric Scattering".
BSD 3-Clause "New" or "Revised" License
908 stars 120 forks source link

VS2017 compatibility #1

Closed janspisiak closed 6 years ago

janspisiak commented 7 years ago

Hi, thanks for your demo, managed to make it run on Win32. Few problems were using constexpr variables as a result of trig functions (as they are not implemented to be constexpr, but it's a bug in gcc that it works). Replacing them with const works fine. M_PI needed to be defined, that's easy to define myself. Biggest problem were string literals when constructing shaders. There is a limit, I think 16kB, or even less in MSVC, so I had to split the std::string into multiple literals. Maybe better approach could be reading the file? Don't know. Hope this helps somebody

ebruneton commented 7 years ago

Hi,

Thanks for your feedback. I'm working on Linux, could you send me a patch with your changes of const/constexpr? For string literals, does it work better if you replace the last lines of the makefile with

%.glsl.inc: %.glsl sed -e '1i const char $(F)_glsl = R"(' -e '$$a )";' $< > $@

i.e. by using "const char*" constants instead of string constants?

Eric

Hi, thanks for your demo, managed to make it run on Win32. Few problems were using constexpr variables as a result of trig functions (as they are not implemented to be constexpr, but it's a bug in gcc that it works). Replacing them with const works fine. M_PI needed to be defined, that's easy to define myself. Biggest problem were string literals when constructing shaders. There is a limit, I think 16kB, or even less in MSVC, so I had to split the std::string into multiple literals. Maybe better approach could be reading the file? Don't know. Hope this helps somebody

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub , or mute the thread .

ebruneton commented 6 years ago

Closing this as "infeasible" (missing input from requester).