Cleanup: fix source typos homogenous->homogeneous
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14306
This commit is contained in:
parent
e1a1dc868b
commit
62a0984d72
@ -80,7 +80,7 @@ static bool is_single_supported_device(Device *device, DenoiserType type)
|
|||||||
|
|
||||||
if (!device->info.multi_devices.empty()) {
|
if (!device->info.multi_devices.empty()) {
|
||||||
/* Some configurations will use multi_devices, but keep the type of an individual device.
|
/* Some configurations will use multi_devices, but keep the type of an individual device.
|
||||||
* This does simplify checks for homogenous setups, but here we really need a single device. */
|
* This does simplify checks for homogeneous setups, but here we really need a single device. */
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,7 +543,7 @@ static void read_subd_geometry(CachedData &cached_data, const SubDSchemaData &da
|
|||||||
|
|
||||||
add_positions(data.positions.getValue(iss), time, cached_data);
|
add_positions(data.positions.getValue(iss), time, cached_data);
|
||||||
|
|
||||||
if (data.topology_variance != kHomogenousTopology || cached_data.shader.size() == 0) {
|
if (data.topology_variance != kHomogeneousTopology || cached_data.shader.size() == 0) {
|
||||||
add_subd_polygons(cached_data, data, time);
|
add_subd_polygons(cached_data, data, time);
|
||||||
add_subd_edge_creases(cached_data, data, time);
|
add_subd_edge_creases(cached_data, data, time);
|
||||||
add_subd_vertex_creases(cached_data, data, time);
|
add_subd_vertex_creases(cached_data, data, time);
|
||||||
@ -582,7 +582,7 @@ static void read_curves_data(CachedData &cached_data, const CurvesSchemaData &da
|
|||||||
array<int> curve_first_key;
|
array<int> curve_first_key;
|
||||||
array<int> curve_shader;
|
array<int> curve_shader;
|
||||||
|
|
||||||
const bool is_homogenous = data.topology_variance == kHomogenousTopology;
|
const bool is_homogeneous = data.topology_variance == kHomogeneousTopology;
|
||||||
|
|
||||||
curve_keys.reserve(position->size());
|
curve_keys.reserve(position->size());
|
||||||
curve_radius.reserve(position->size());
|
curve_radius.reserve(position->size());
|
||||||
@ -605,7 +605,7 @@ static void read_curves_data(CachedData &cached_data, const CurvesSchemaData &da
|
|||||||
curve_radius.push_back_slow(radius * data.radius_scale);
|
curve_radius.push_back_slow(radius * data.radius_scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_homogenous || cached_data.curve_first_key.size() == 0) {
|
if (!is_homogeneous || cached_data.curve_first_key.size() == 0) {
|
||||||
curve_first_key.push_back_reserved(offset);
|
curve_first_key.push_back_reserved(offset);
|
||||||
curve_shader.push_back_reserved(0);
|
curve_shader.push_back_reserved(0);
|
||||||
}
|
}
|
||||||
@ -616,7 +616,7 @@ static void read_curves_data(CachedData &cached_data, const CurvesSchemaData &da
|
|||||||
cached_data.curve_keys.add_data(curve_keys, time);
|
cached_data.curve_keys.add_data(curve_keys, time);
|
||||||
cached_data.curve_radius.add_data(curve_radius, time);
|
cached_data.curve_radius.add_data(curve_radius, time);
|
||||||
|
|
||||||
if (!is_homogenous || cached_data.curve_first_key.size() == 0) {
|
if (!is_homogeneous || cached_data.curve_first_key.size() == 0) {
|
||||||
cached_data.curve_first_key.add_data(curve_first_key, time);
|
cached_data.curve_first_key.add_data(curve_first_key, time);
|
||||||
cached_data.curve_shader.add_data(curve_shader, time);
|
cached_data.curve_shader.add_data(curve_shader, time);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ TEST(task, MempoolIter)
|
|||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* 'Randomly' add and remove some items from mempool, to create a non-homogenous one. */
|
/* 'Randomly' add and remove some items from mempool, to create a non-homogeneous one. */
|
||||||
int num_items = 0;
|
int num_items = 0;
|
||||||
for (i = 0; i < NUM_ITEMS; i++) {
|
for (i = 0; i < NUM_ITEMS; i++) {
|
||||||
data[i] = (int *)BLI_mempool_alloc(mempool);
|
data[i] = (int *)BLI_mempool_alloc(mempool);
|
||||||
|
@ -62,7 +62,7 @@ static float circle_to_polygon_radius(float sides_count, float theta)
|
|||||||
cosf(theta - side_angle * floorf((sides_count * theta + M_PI) / (2.0f * M_PI)));
|
cosf(theta - side_angle * floorf((sides_count * theta + M_PI) / (2.0f * M_PI)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remap input angle to have homogenous spacing of points along a polygon edge.
|
/* Remap input angle to have homogeneous spacing of points along a polygon edge.
|
||||||
* Expect theta to be in [0..2pi] range. */
|
* Expect theta to be in [0..2pi] range. */
|
||||||
static float circle_to_polygon_angle(float sides_count, float theta)
|
static float circle_to_polygon_angle(float sides_count, float theta)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ float circle_to_polygon_radius(float sides_count, float theta)
|
|||||||
cos(theta - side_angle * floor((sides_count * theta + M_PI) / M_2PI));
|
cos(theta - side_angle * floor((sides_count * theta + M_PI) / M_2PI));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remap input angle to have homogenous spacing of points along a polygon edge.
|
/* Remap input angle to have homogeneous spacing of points along a polygon edge.
|
||||||
* Expect theta to be in [0..2pi] range. */
|
* Expect theta to be in [0..2pi] range. */
|
||||||
float circle_to_polygon_angle(float sides_count, float theta)
|
float circle_to_polygon_angle(float sides_count, float theta)
|
||||||
{
|
{
|
||||||
|
@ -16,9 +16,9 @@ out vec4 FragColor;
|
|||||||
vec3 background_transform_to_world(vec3 viewvec)
|
vec3 background_transform_to_world(vec3 viewvec)
|
||||||
{
|
{
|
||||||
vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(viewvec, 1.0) : vec4(0.0, 0.0, 1.0, 1.0);
|
vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(viewvec, 1.0) : vec4(0.0, 0.0, 1.0, 1.0);
|
||||||
vec4 co_homogenous = (ProjectionMatrixInverse * v);
|
vec4 co_homogeneous = (ProjectionMatrixInverse * v);
|
||||||
|
|
||||||
vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0);
|
vec4 co = vec4(co_homogeneous.xyz / co_homogeneous.w, 0.0);
|
||||||
return (ViewMatrixInverse * co).xyz;
|
return (ViewMatrixInverse * co).xyz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,9 +4,9 @@ void node_tex_environment_texco(vec3 viewvec, out vec3 worldvec)
|
|||||||
worldvec = worldPosition;
|
worldvec = worldPosition;
|
||||||
#else
|
#else
|
||||||
vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(viewvec, 1.0) : vec4(0.0, 0.0, 1.0, 1.0);
|
vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(viewvec, 1.0) : vec4(0.0, 0.0, 1.0, 1.0);
|
||||||
vec4 co_homogenous = (ProjectionMatrixInverse * v);
|
vec4 co_homogeneous = (ProjectionMatrixInverse * v);
|
||||||
|
|
||||||
vec3 co = co_homogenous.xyz / co_homogenous.w;
|
vec3 co = co_homogeneous.xyz / co_homogeneous.w;
|
||||||
# if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE)
|
# if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE)
|
||||||
worldvec = mat3(ViewMatrixInverse) * co;
|
worldvec = mat3(ViewMatrixInverse) * co;
|
||||||
# else
|
# else
|
||||||
|
@ -19,8 +19,8 @@ void generated_from_orco(vec3 orco, out vec3 generated)
|
|||||||
void generated_texco(vec3 I, vec3 attr_orco, out vec3 generated)
|
void generated_texco(vec3 I, vec3 attr_orco, out vec3 generated)
|
||||||
{
|
{
|
||||||
vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(I, 1.0) : vec4(0.0, 0.0, 1.0, 1.0);
|
vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(I, 1.0) : vec4(0.0, 0.0, 1.0, 1.0);
|
||||||
vec4 co_homogenous = (ProjectionMatrixInverse * v);
|
vec4 co_homogeneous = (ProjectionMatrixInverse * v);
|
||||||
vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0);
|
vec4 co = vec4(co_homogeneous.xyz / co_homogeneous.w, 0.0);
|
||||||
co.xyz = normalize(co.xyz);
|
co.xyz = normalize(co.xyz);
|
||||||
#if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE)
|
#if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE)
|
||||||
generated = (ViewMatrixInverse * co).xyz;
|
generated = (ViewMatrixInverse * co).xyz;
|
||||||
@ -68,9 +68,9 @@ void node_tex_coord_background(vec3 I,
|
|||||||
out vec3 reflection)
|
out vec3 reflection)
|
||||||
{
|
{
|
||||||
vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(I, 1.0) : vec4(0.0, 0.0, 1.0, 1.0);
|
vec4 v = (ProjectionMatrix[3][3] == 0.0) ? vec4(I, 1.0) : vec4(0.0, 0.0, 1.0, 1.0);
|
||||||
vec4 co_homogenous = (ProjectionMatrixInverse * v);
|
vec4 co_homogeneous = (ProjectionMatrixInverse * v);
|
||||||
|
|
||||||
vec4 co = vec4(co_homogenous.xyz / co_homogenous.w, 0.0);
|
vec4 co = vec4(co_homogeneous.xyz / co_homogeneous.w, 0.0);
|
||||||
|
|
||||||
co = normalize(co);
|
co = normalize(co);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user