Replaces all usage by the the gpu_shader_math equivalent. This is because the old shader library was quite tangled. This avoids dependency hell trying to mix libraries. Changes are split into isolated commits until I had to do mass changes because of inter- dependencies. Pull Request: https://projects.blender.org/blender/blender/pulls/113631
16 lines
394 B
GLSL
16 lines
394 B
GLSL
/* SPDX-FileCopyrightText: 2019-2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma BLENDER_REQUIRE(gpu_shader_material_transform_utils.glsl)
|
|
|
|
void camera(out vec3 outview, out float outdepth, out float outdist)
|
|
{
|
|
vec3 vP;
|
|
point_transform_world_to_view(g_data.P, vP);
|
|
vP.z = -vP.z;
|
|
outdepth = abs(vP.z);
|
|
outdist = length(vP);
|
|
outview = normalize(vP);
|
|
}
|