Home Technical Talk

Shader/UDK - Atmospheric Sky Scattering - Code sections not available?

polycounter lvl 12
Offline / Send Message
Ace-Angel polycounter lvl 12
Hey to all,

I was wondering if anyone knew a good way to substitute certain function or math for application that don't have certain functions available?

For example, I'm trying for a Atmospheric Scattering material in UDK, but there are snippets of code which don't work in UDK, like this for example:
float fFar = length( v3Vector );

Currently, UDK doesn't allow me to access the Length function, so I approximated it by using the 'Distance' function instead, but that doesn't seem right since my current output looks like a glow ball of fire.

This happens both for Planet and Sky based Atom-Scatter.

Incase you need to checkup the codes I'm referencing, here they are;
http://www.gamedev.net/topic/621187-sean-oneils-atmospheric-scattering/
http://forums.create.msdn.com/forums/p/9117/454655.aspx
http://stainlessbeer.weebly.com/planets-9-atmospheric-scattering.html
http://forum.unity3d.com/threads/12296-Atmospheric-Scattering-help

Cheers!

Replies

Sign In or Register to comment.