This unify the C++ and GLSL codebase style. The GLSL types are still in the backend compatibility layers to support python shaders. However, the C++ shader compilation layer doesn't have them to enforce correct type usage. Note that this is going to break pretty much all PRs in flight that targets shader code. Rel #137261 Pull Request: https://projects.blender.org/blender/blender/pulls/137369
25 lines
444 B
GLSL
25 lines
444 B
GLSL
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#if defined(GPU_COMPUTE_SHADER) || defined(GPU_VERTEX_SHADER)
|
|
|
|
void main()
|
|
{
|
|
data_out[0] = int(float_in);
|
|
data_out[1] = int(uint_in);
|
|
data_out[2] = int(int_in);
|
|
data_out[3] = int(bool_in);
|
|
|
|
# if defined(GPU_VERTEX_SHADER)
|
|
gl_Position = float4(0.0f, 0.0f, 0.0f, 1.0f);
|
|
gl_PointSize = 1.0f;
|
|
# endif
|
|
}
|
|
|
|
#else
|
|
|
|
void main() {}
|
|
|
|
#endif
|