This is the first step of moving the create infos back inside shader sources. All info files are now treated as source files. However, they are not considered in the include tree yet. This will come in another following PR. Each shader source file now generate a `.info` file containing only the create info declarations. This renames all info files so that they do not conflict with their previous versions that were copied (non-generated). Pull Request: https://projects.blender.org/blender/blender/pulls/146676
21 lines
591 B
GLSL
21 lines
591 B
GLSL
/* SPDX-FileCopyrightText: 2020-2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "infos/overlay_background_infos.hh"
|
|
|
|
VERTEX_SHADER_CREATE_INFO(overlay_clipbound)
|
|
|
|
#include "draw_view_lib.glsl"
|
|
|
|
void main()
|
|
{
|
|
float3 world_pos = boundbox[gl_VertexID];
|
|
gl_Position = drw_point_world_to_homogenous(world_pos);
|
|
|
|
/* Result in a position at 1.0 (far plane). Small epsilon to avoid precision issue.
|
|
* This mimics the effect of infinite projection matrix
|
|
* (see http://www.terathon.com/gdc07_lengyel.pdf). */
|
|
gl_Position.z = gl_Position.w - 2.4e-7f;
|
|
}
|