Blender
V5.3
source
blender
gpu
shaders
common
gpu_shader_fullscreen.bsl.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2015-2022 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
gpu_shader_compat.hh
"
8
9
/* Position vertices of a triangle to cover the whole screen. */
10
void
fullscreen_vertex
(
int
vertex_id
,
float4
&out_position)
11
{
12
int
v =
vertex_id
% 3;
13
float
x
= -1.0f +
float
((v & 1) << 2);
14
float
y
= -1.0f +
float
((v & 2) << 1);
15
out_position =
float4
(
x
,
y
, 1.0f, 1.0f);
16
}
17
18
void
fullscreen_vertex
(
int
vertex_id
,
float4
&out_position,
float2
&out_uv)
19
{
20
fullscreen_vertex
(
vertex_id
, out_position);
21
out_uv = (out_position.xy + 1.0f) * 0.5f;
22
}
y
y
Definition
compositor_morphological_blur_infos.hh:32
gpu_shader_compat.hh
vertex_id
#define vertex_id
Definition
gpu_shader_cxx_attribute.hh:74
fullscreen_vertex
void fullscreen_vertex(int vertex_id, float4 &out_position)
Definition
gpu_shader_fullscreen.bsl.hh:10
x
uint x
Definition
kernel/device/gpu/kernel.h:142
float
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
Definition
shadow_state_template.h:80
float2
Definition
types_float2.h:13
float4
Definition
sky_math.h:224
Generated on
for Blender by
doxygen
1.18.0