2023-08-04 13:24:17 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
2013-05-20 15:58:37 +00:00
|
|
|
|
|
|
|
|
#include "oslutil.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "stdcycles.h"
|
2013-05-20 15:58:37 +00:00
|
|
|
|
2015-02-21 14:49:55 +05:00
|
|
|
shader node_wireframe(string bump_offset = "center",
|
2013-05-20 15:58:37 +00:00
|
|
|
int use_pixel_size = 0,
|
|
|
|
|
float Size = 0.01,
|
|
|
|
|
output float Fac = 0.0)
|
|
|
|
|
{
|
2015-02-21 14:49:55 +05:00
|
|
|
if (bump_offset == "dx") {
|
2025-01-31 18:58:16 +01:00
|
|
|
P += Dx(P) * BUMP_DX;
|
2015-02-21 14:49:55 +05:00
|
|
|
}
|
|
|
|
|
else if (bump_offset == "dy") {
|
2025-01-31 18:58:16 +01:00
|
|
|
P += Dy(P) * BUMP_DY;
|
2015-02-21 14:49:55 +05:00
|
|
|
}
|
2025-02-03 10:57:34 +01:00
|
|
|
|
|
|
|
|
Fac = wireframe("triangles", Size, use_pixel_size);
|
2013-05-20 15:58:37 +00:00
|
|
|
}
|