Merge branch 'blender-v3.1-release'

This commit is contained in:
Jacques Lucke
2022-01-31 17:43:43 +01:00
8 changed files with 15 additions and 5 deletions

View File

@@ -1269,7 +1269,7 @@ static void remove_id_attribute_from_instances(GeometrySet &geometry_set)
{
geometry_set.modify_geometry_sets([&](GeometrySet &sub_geometry) {
if (sub_geometry.has<InstancesComponent>()) {
InstancesComponent &component = geometry_set.get_component_for_write<InstancesComponent>();
InstancesComponent &component = sub_geometry.get_component_for_write<InstancesComponent>();
component.attributes().remove("id");
}
});

View File

@@ -1,3 +1,5 @@
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
#ifndef USE_GPU_SHADER_CREATE_INFO
noperspective in vec4 finalColor;
out vec4 fragColor;

View File

@@ -1,3 +1,5 @@
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
#ifndef USE_GPU_SHADER_CREATE_INFO
in vec4 finalColor;
out vec4 fragColor;

View File

@@ -6,13 +6,13 @@
uniform bool srgbTarget = false;
#endif
vec4 blender_srgb_to_framebuffer_space(vec4 color)
vec4 blender_srgb_to_framebuffer_space(vec4 col)
{
if (srgbTarget) {
vec3 c = max(color.rgb, vec3(0.0));
vec3 c = max(col.rgb, vec3(0.0));
vec3 c1 = c * (1.0 / 12.92);
vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
color.rgb = mix(c1, c2, step(vec3(0.04045), c));
col.rgb = mix(c1, c2, step(vec3(0.04045), c));
}
return color;
return col;
}

View File

@@ -1,3 +1,5 @@
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
#ifndef USE_GPU_SHADER_CREATE_INFO
flat in vec4 finalColor;
out vec4 fragColor;

View File

@@ -1,3 +1,5 @@
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
#ifndef USE_GPU_SHADER_CREATE_INFO
flat in vec4 color_flat;
noperspective in vec2 texCoord_interp;

View File

@@ -1,3 +1,4 @@
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
#ifndef USE_GPU_SHADER_CREATE_INFO
uniform vec4 color;

View File

@@ -24,4 +24,5 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_CREATE_INFO(gpu_srgb_to_framebuffer_space)
.push_constant(Type::BOOL, "srgbTarget")
.define("blender_srgb_to_framebuffer_space(a) a");