This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl
Clément Foucault da741013a1 EEVEE: GLSL refactor/cleanup
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code
complexity and duplication.
- split bsdf_common_lib.glsl into multiple sub library which are now shared
with other engines.
- the surface shader code is now more organised and have its own files.
- change default world to use a material nodetree and make lookdev shader
more clear.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D8306
2020-07-30 16:44:58 +02:00

36 lines
957 B
GLSL

#pragma BLENDER_REQUIRE(common_hair_lib.glsl)
#pragma BLENDER_REQUIRE(common_view_lib.glsl)
#ifndef HAIR_SHADER
in vec3 pos;
#endif
void main()
{
GPU_INTEL_VERTEX_SHADER_WORKAROUND
#ifdef HAIR_SHADER
float time, thick_time, thickness;
vec3 worldPosition, tan, binor;
hair_get_pos_tan_binor_time((ProjectionMatrix[3][3] == 0.0),
ModelMatrixInverse,
ViewMatrixInverse[3].xyz,
ViewMatrixInverse[2].xyz,
worldPosition,
tan,
binor,
time,
thickness,
thick_time);
#else
vec3 worldPosition = point_object_to_world(pos);
#endif
gl_Position = point_world_to_ndc(worldPosition);
#ifdef CLIP_PLANES
gl_ClipDistance[0] = dot(vec4(worldPosition.xyz, 1.0), clipPlanes[0]);
#endif
}