- 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
28 lines
539 B
GLSL
28 lines
539 B
GLSL
|
|
#pragma BLENDER_REQUIRE(common_view_lib.glsl)
|
|
#pragma BLENDER_REQUIRE(surface_lib.glsl)
|
|
|
|
in vec2 pos;
|
|
|
|
RESOURCE_ID_VARYING
|
|
|
|
void main()
|
|
{
|
|
GPU_INTEL_VERTEX_SHADER_WORKAROUND
|
|
|
|
PASS_RESOURCE_ID
|
|
|
|
gl_Position = vec4(pos, 1.0, 1.0);
|
|
viewPosition = vec3(pos, -1.0);
|
|
|
|
#ifndef VOLUMETRICS
|
|
/* Not used in practice but needed to avoid compilation errors. */
|
|
worldPosition = viewPosition;
|
|
worldNormal = viewNormal = normalize(-viewPosition);
|
|
#endif
|
|
|
|
#ifdef USE_ATTR
|
|
pass_attr(viewPosition, NormalMatrix, ModelMatrixInverse);
|
|
#endif
|
|
}
|