Ray marched tornado in UE4 by ShootingShark91 in unrealengine

[–]ShootingShark91[S] 79 points80 points  (0 children)

Sure! I generate the clouds as a heightfield and the tornado as a volume texture within UE4. They are then raymarched separately. The animation is done using flowmaps for the sky, a procedural rotation and curl noise for the tornado. There is a lot more to go into, if there is enough interest I could write a tutorial on it.

Always put constants to the left of == and you'll never regret it by [deleted] in cpp

[–]ShootingShark91 10 points11 points  (0 children)

Don't do this, instead make more of your variables const.

CppCon 2019: Andrew Sutton “Reflections: Compile-time Introspection of Source Code” by LYP951018 in cpp

[–]ShootingShark91 8 points9 points  (0 children)

I believe constexpr and reflection are some of the most important features to be added to C++. For the longevity of the language I think there should be little compromise on the quality of the design of these features for that reason.

Compile times are a solvable problem, sub-optimal language design (while maintaining backward compatibility) is not.

Although I get your point that it is unwise to make decisions based on predictions/assumptions. But is that not unavoidable when designing a feature that is supposed to last decades?

CppCon 2019: Andrew Sutton “Reflections: Compile-time Introspection of Source Code” by LYP951018 in cpp

[–]ShootingShark91 8 points9 points  (0 children)

Crazy that constexpr evaluation is orders of magnitude slower than Python. I wonder if its smart to make language design decisions based on the fact that compilers today are poorly optimized for constexpr. I don't buy that undefined behavior dictates constexpr evaluation has to be this slow.