Sha256: 409a027b8650a055fd399efd5b9e06b74c35ac9d69eee1a79296f96d33f4e280

Contents?: true

Size: 447 Bytes

Versions: 21

Compression:

Stored size: 447 Bytes

Contents

#ifdef USE_FOG

	#ifdef USE_LOGDEPTHBUF_EXT

		float depth = gl_FragDepthEXT / gl_FragCoord.w;

	#else

		float depth = gl_FragCoord.z / gl_FragCoord.w;

	#endif

	#ifdef FOG_EXP2

		float fogFactor = exp2( - square( fogDensity ) * square( depth ) * LOG2 );
		fogFactor = whiteCompliment( fogFactor );

	#else

		float fogFactor = smoothstep( fogNear, fogFar, depth );

	#endif
	
	outgoingLight = mix( outgoingLight, fogColor, fogFactor );

#endif

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
mittsu-opengl-0.5.1 lib/mittsu/opengl/shader/chunks/fog_fragment.glsl
mittsu-0.4.1 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-opengl-0.5.0 lib/mittsu/opengl/shader/chunks/fog_fragment.glsl
mittsu-0.4.0 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.3.3 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.3.2 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.3.1 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.3.0 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.2.4 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.2.3 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.2.2 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.2.1 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.2.0 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.1.7 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.1.6 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.1.5 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.1.4 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.1.3 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.1.2 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
mittsu-0.1.1 lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl