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

Legibility of documentation #19

Closed LocalStarlight closed 6 years ago

LocalStarlight commented 6 years ago

My apologies if this is a really stupid question.

I am trying to read this code in detail so that I can really understand it, but the formatting of the documentation is very strange.

It kinda looks like HTML (with all the paragraph tags etc. and SVG sections) but when I copy-pasted the code into an HTML file and opened it up, it's all over the place.

And where on an SVG diagram a point is labelled, for example, 'b', it's listed in the documenation like this: $\bp$

And then there are sections like this: $\mu=\bo\bp\cdot\bp\bi/\Vert\bo\bp\Vert\Vert\bp\bi\Vert$

Which I presume should look a lot simpler!

How can I view this code in the way intended so that it is intelligible?

Thanks!

ebruneton commented 6 years ago

You can use "make doc" to generate the documentation in HTML format. The result should look like https://ebruneton.github.io/precomputed_atmospheric_scattering/

ebruneton commented 6 years ago

PS: I'm referring to https://en.wikipedia.org/wiki/Make_(software)#Modern_versions (more precisely GNU Make), to be used with https://github.com/ebruneton/precomputed_atmospheric_scattering/blob/master/Makefile

LocalStarlight commented 6 years ago

Hey, thanks for following up. I actually figured out that the full documentation (https://ebruneton.github.io/precomputed_atmospheric_scattering/) has links to all the documentation files I was looking for anyway. Thanks so much for your help.

And thanks for this incredible work. I have a mountain to climb trying to understand it (haven't done any maths since I was in school), but hoping to get it working in Unreal Engine.

ebruneton commented 6 years ago

By the way, the default atmosphere in Unreal Engine is already using this algorithm* (more precisely the previous implementation, but it produces similar results as this new implementation): https://github.com/sinisterrook/unrealengine/blob/master/Engine/Shaders/AtmosphereCommon.usf.

*maybe with some simplifications or modifications, I haven't checked their code.

LocalStarlight commented 6 years ago

Ah, I did not know that!

Unless I'm mistaken, it doesn't seem to be set up for a planetary atmosphere though? I need to be able to enter/exit the atmosphere from space, it seems like UE4's version is based around a flat plane, but I could be wrong. I've spent the last week or so trying to understand and figure out your code (not ever having used glsl before has slowed me down considerably), so hopefully that wasn't all in vain if I could have just used UE4's own system anyway! Thanks for letting me know.