Cleanup: Grey --> Gray
This commit is contained in:
@@ -681,7 +681,7 @@ Image classes
|
|||||||
|
|
||||||
.. attribute:: zbuff
|
.. attribute:: zbuff
|
||||||
|
|
||||||
Use depth component of render as grey scale color - suitable for texture source.
|
Use depth component of render as grayscale color - suitable for texture source.
|
||||||
|
|
||||||
:type: bool
|
:type: bool
|
||||||
|
|
||||||
@@ -817,7 +817,7 @@ Image classes
|
|||||||
|
|
||||||
.. attribute:: zbuff
|
.. attribute:: zbuff
|
||||||
|
|
||||||
Use depth component of viewport as grey scale color - suitable for texture source.
|
Use depth component of viewport as grayscale color - suitable for texture source.
|
||||||
|
|
||||||
:type: bool
|
:type: bool
|
||||||
|
|
||||||
@@ -1260,8 +1260,8 @@ Filter classes
|
|||||||
|
|
||||||
.. class:: FilterGray
|
.. class:: FilterGray
|
||||||
|
|
||||||
Filter for gray scale effect.
|
Filter for grayscale effect.
|
||||||
Proportions of R, G and B contributions in the output gray scale are 28:151:77.
|
Proportions of R, G and B contributions in the output grayscale are 28:151:77.
|
||||||
|
|
||||||
.. attribute:: previous
|
.. attribute:: previous
|
||||||
|
|
||||||
|
@@ -1329,7 +1329,7 @@ ccl_device_inline float3 safe_divide_even_color(float3 a, float3 b)
|
|||||||
y = (b.y != 0.0f)? a.y/b.y: 0.0f;
|
y = (b.y != 0.0f)? a.y/b.y: 0.0f;
|
||||||
z = (b.z != 0.0f)? a.z/b.z: 0.0f;
|
z = (b.z != 0.0f)? a.z/b.z: 0.0f;
|
||||||
|
|
||||||
/* try to get grey even if b is zero */
|
/* try to get gray even if b is zero */
|
||||||
if(b.x == 0.0f) {
|
if(b.x == 0.0f) {
|
||||||
if(b.y == 0.0f) {
|
if(b.y == 0.0f) {
|
||||||
x = z;
|
x = z;
|
||||||
|
@@ -568,7 +568,7 @@ class pyRandomColorShader(StrokeShader):
|
|||||||
|
|
||||||
class py2DCurvatureColorShader(StrokeShader):
|
class py2DCurvatureColorShader(StrokeShader):
|
||||||
"""
|
"""
|
||||||
Assigns a color (greyscale) to the stroke based on the curvature.
|
Assigns a color (grayscale) to the stroke based on the curvature.
|
||||||
A higher curvature will yield a brighter color.
|
A higher curvature will yield a brighter color.
|
||||||
"""
|
"""
|
||||||
def shade(self, stroke):
|
def shade(self, stroke):
|
||||||
@@ -584,7 +584,7 @@ class py2DCurvatureColorShader(StrokeShader):
|
|||||||
|
|
||||||
class pyTimeColorShader(StrokeShader):
|
class pyTimeColorShader(StrokeShader):
|
||||||
"""
|
"""
|
||||||
Assigns a greyscale value that increases for every vertex.
|
Assigns a grayscale value that increases for every vertex.
|
||||||
The brightness will increase along the stroke.
|
The brightness will increase along the stroke.
|
||||||
"""
|
"""
|
||||||
def __init__(self, step=0.01):
|
def __init__(self, step=0.01):
|
||||||
|
@@ -68,7 +68,7 @@ PyTypeObject FilterGrayType =
|
|||||||
0, /*tp_setattro*/
|
0, /*tp_setattro*/
|
||||||
0, /*tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
Py_TPFLAGS_DEFAULT, /*tp_flags*/
|
Py_TPFLAGS_DEFAULT, /*tp_flags*/
|
||||||
"Filter for gray scale effect", /* tp_doc */
|
"Filter for grayscale effect", /* tp_doc */
|
||||||
0, /* tp_traverse */
|
0, /* tp_traverse */
|
||||||
0, /* tp_clear */
|
0, /* tp_clear */
|
||||||
0, /* tp_richcompare */
|
0, /* tp_richcompare */
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
#include "FilterBase.h"
|
#include "FilterBase.h"
|
||||||
|
|
||||||
|
|
||||||
/// pixel filter for gray scale
|
/// pixel filter for grayscale
|
||||||
class FilterGray : public FilterBase
|
class FilterGray : public FilterBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -53,7 +53,7 @@ protected:
|
|||||||
// calculate gray value
|
// calculate gray value
|
||||||
unsigned int gray = (28 * (VT_B(val)) + 151 * (VT_G(val))
|
unsigned int gray = (28 * (VT_B(val)) + 151 * (VT_G(val))
|
||||||
+ 77 * (VT_R(val))) >> 8;
|
+ 77 * (VT_R(val))) >> 8;
|
||||||
// return gray scale value
|
// return grayscale value
|
||||||
VT_R(val) = gray;
|
VT_R(val) = gray;
|
||||||
VT_G(val) = gray;
|
VT_G(val) = gray;
|
||||||
VT_B(val) = gray;
|
VT_B(val) = gray;
|
||||||
|
Reference in New Issue
Block a user