Sha256: c0c0fbcd86da07ec0d91b08955361b34246b4660f21c3a149d56a80c1bb4b307

Contents?: true

Size: 431 Bytes

Versions: 21

Compression:

Stored size: 431 Bytes

Contents

#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG )

	vec3 worldNormal = transformDirection( objectNormal, modelMatrix );

	vec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );

	#ifdef ENVMAP_MODE_REFLECTION

		vReflect = reflect( cameraToVertex, worldNormal );

	#else

		vReflect = refract( cameraToVertex, worldNormal, refractionRatio );

	#endif

#endif

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
mittsu-0.1.0 lib/mittsu/renderers/shaders/shader_chunk/envmap_vertex.glsl