WIP: Brush assets project #106303
|
@ -1014,17 +1014,15 @@ class IMAGE_PT_snapping(Panel):
|
|||
|
||||
layout = self.layout
|
||||
col = layout.column()
|
||||
col.label(text="Snapping")
|
||||
col.label(text="Snap Target")
|
||||
col.prop(tool_settings, "snap_uv_element", expand=True)
|
||||
|
||||
if tool_settings.snap_uv_element != 'INCREMENT':
|
||||
col.label(text="Target")
|
||||
col.label(text="Snap Base")
|
||||
row = col.row(align=True)
|
||||
row.prop(tool_settings, "snap_target", expand=True)
|
||||
|
||||
col.separator()
|
||||
if 'INCREMENT' in tool_settings.snap_uv_element:
|
||||
col.prop(tool_settings, "use_snap_uv_grid_absolute")
|
||||
|
||||
col.label(text="Affect")
|
||||
row = col.row(align=True)
|
||||
|
|
|
@ -1015,9 +1015,11 @@ void insert_key_rna(PointerRNA *rna_pointer,
|
|||
/* Keyframing functions can deal with the nla_context being a nullptr. */
|
||||
ListBase nla_cache = {nullptr, nullptr};
|
||||
NlaKeyframingContext *nla_context = nullptr;
|
||||
|
||||
if (adt && adt->action == action) {
|
||||
PointerRNA id_pointer = RNA_id_pointer_create(id);
|
||||
nla_context = BKE_animsys_get_nla_keyframing_context(
|
||||
&nla_cache, rna_pointer, adt, &anim_eval_context);
|
||||
&nla_cache, &id_pointer, adt, &anim_eval_context);
|
||||
}
|
||||
|
||||
const float nla_frame = BKE_nla_tweakedit_remap(adt, scene_frame, NLATIME_CONVERT_UNMAP);
|
||||
|
|
|
@ -237,7 +237,7 @@ typedef struct NlaKeyframingContext NlaKeyframingContext;
|
|||
*
|
||||
* \param cache: List used to cache contexts for reuse when keying
|
||||
* multiple channels in one operation.
|
||||
* \param ptr: RNA pointer to the Object with the animation.
|
||||
* \param ptr: RNA pointer to the ID with the animation.
|
||||
* \return Keyframing context, or NULL if not necessary.
|
||||
*/
|
||||
struct NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context(
|
||||
|
|
|
@ -3673,6 +3673,11 @@ void nlasnapshot_blend_get_inverted_lower_snapshot(NlaEvalData *eval_data,
|
|||
NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context(
|
||||
ListBase *cache, PointerRNA *ptr, AnimData *adt, const AnimationEvalContext *anim_eval_context)
|
||||
{
|
||||
/* The PointerRNA needs to point to an ID because animsys_evaluate_nla_for_keyframing uses
|
||||
* F-Curve paths to resolve properties. Since F-Curve paths are always relative to the ID this
|
||||
* would fail if the PointerRNA was e.g. a bone. */
|
||||
BLI_assert(RNA_struct_is_ID(ptr->type));
|
||||
|
||||
/* No remapping needed if NLA is off or no action. */
|
||||
if ((adt == nullptr) || (adt->action == nullptr) || (adt->nla_tracks.first == nullptr) ||
|
||||
(adt->flag & ADT_NLA_EVAL_OFF))
|
||||
|
|
|
@ -150,7 +150,11 @@ void PlanarProbeModule::viewport_draw(View &view, GPUFrameBuffer *view_fb)
|
|||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK);
|
||||
viewport_display_ps_.framebuffer_set(&view_fb);
|
||||
viewport_display_ps_.shader_set(inst_.shaders.static_shader_get(DISPLAY_PROBE_PLANAR));
|
||||
bind_resources(viewport_display_ps_);
|
||||
SphereProbeData &world_data = *static_cast<SphereProbeData *>(&inst_.light_probes.world_sphere_);
|
||||
viewport_display_ps_.push_constant("world_coord_packed",
|
||||
reinterpret_cast<int4 *>(&world_data.atlas_coord));
|
||||
viewport_display_ps_.bind_resources(*this);
|
||||
viewport_display_ps_.bind_resources(inst_.sphere_probes);
|
||||
viewport_display_ps_.bind_ssbo("display_data_buf", display_data_buf_);
|
||||
viewport_display_ps_.draw_procedural(GPU_PRIM_TRIS, 1, display_data_buf_.size() * 6);
|
||||
|
||||
|
|
|
@ -2,9 +2,24 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#pragma BLENDER_REQUIRE(draw_view_lib.glsl)
|
||||
#pragma BLENDER_REQUIRE(eevee_reflection_probe_lib.glsl)
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 uv = gl_FragCoord.xy / vec2(textureSize(planar_radiance_tx, 0).xy);
|
||||
out_color = texture(planar_radiance_tx, vec3(uv, probe_index));
|
||||
float depth = texture(planar_depth_tx, vec3(uv, probe_index)).r;
|
||||
if (depth == 1.0) {
|
||||
vec3 ndc = drw_screen_to_ndc(vec3(uv, 0.0));
|
||||
vec3 wP = drw_point_ndc_to_world(ndc);
|
||||
vec3 V = drw_world_incident_vector(wP);
|
||||
vec3 R = -reflect(V, probe_normal);
|
||||
|
||||
SphereProbeUvArea world_atlas_coord = reinterpret_as_atlas_coord(world_coord_packed);
|
||||
out_color = reflection_probes_sample(R, 0.0, world_atlas_coord);
|
||||
}
|
||||
else {
|
||||
out_color = texture(planar_radiance_tx, vec3(uv, probe_index));
|
||||
}
|
||||
out_color.a = 0.0;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,10 @@ void main()
|
|||
|
||||
probe_index = display_data_buf[display_index].probe_index;
|
||||
|
||||
vec3 P = transform_point(display_data_buf[display_index].plane_to_world, vec3(lP, 0.0));
|
||||
mat4 plane_to_world = display_data_buf[display_index].plane_to_world;
|
||||
probe_normal = safe_normalize(plane_to_world[2].xyz);
|
||||
|
||||
vec3 P = transform_point(plane_to_world, vec3(lP, 0.0));
|
||||
gl_Position = drw_point_world_to_homogenous(P);
|
||||
/* Small bias to let the probe draw without Z-fighting. */
|
||||
gl_Position.z -= 0.0001;
|
||||
|
|
|
@ -78,10 +78,16 @@ GPU_SHADER_CREATE_INFO(eevee_display_probe_reflection)
|
|||
.fragment_out(0, Type::VEC4, "out_color")
|
||||
.do_static_compilation(true);
|
||||
|
||||
GPU_SHADER_INTERFACE_INFO(eevee_display_probe_planar_iface, "").flat(Type::INT, "probe_index");
|
||||
GPU_SHADER_INTERFACE_INFO(eevee_display_probe_planar_iface, "")
|
||||
.flat(Type::VEC3, "probe_normal")
|
||||
.flat(Type::INT, "probe_index");
|
||||
|
||||
GPU_SHADER_CREATE_INFO(eevee_display_probe_planar)
|
||||
.additional_info("eevee_shared", "draw_view", "eevee_lightprobe_planar_data")
|
||||
.push_constant(Type::IVEC4, "world_coord_packed")
|
||||
.additional_info("eevee_shared",
|
||||
"draw_view",
|
||||
"eevee_lightprobe_planar_data",
|
||||
"eevee_reflection_probe_data")
|
||||
.storage_buf(0, Qualifier::READ, "PlanarProbeDisplayData", "display_data_buf[]")
|
||||
.vertex_source("eevee_display_probe_planar_vert.glsl")
|
||||
.vertex_out(eevee_display_probe_planar_iface)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit acedb613812213e38f5dea36c3403fd57534b8b1
|
||||
Subproject commit e01789219e681c83e221d861c34f4fe0d782f567
|
Loading…
Reference in New Issue