Merge branch 'master' into blender2.8
This commit is contained in:
@@ -107,7 +107,13 @@ def engine_exit():
|
||||
engine.exit()
|
||||
|
||||
|
||||
classes = (
|
||||
CyclesRender,
|
||||
)
|
||||
|
||||
|
||||
def register():
|
||||
from bpy.utils import register_class
|
||||
from . import ui
|
||||
from . import properties
|
||||
from . import presets
|
||||
@@ -122,12 +128,15 @@ def register():
|
||||
properties.register()
|
||||
ui.register()
|
||||
presets.register()
|
||||
bpy.utils.register_module(__name__)
|
||||
|
||||
for cls in classes:
|
||||
register_class(cls)
|
||||
|
||||
bpy.app.handlers.version_update.append(version_update.do_versions)
|
||||
|
||||
|
||||
def unregister():
|
||||
from bpy.utils import unregister_class
|
||||
from . import ui
|
||||
from . import properties
|
||||
from . import presets
|
||||
@@ -138,4 +147,6 @@ def unregister():
|
||||
ui.unregister()
|
||||
properties.unregister()
|
||||
presets.unregister()
|
||||
bpy.utils.unregister_module(__name__)
|
||||
|
||||
for cls in classes:
|
||||
unregister_class(cls)
|
||||
|
@@ -82,12 +82,23 @@ class AddPresetSampling(AddPresetBase, Operator):
|
||||
preset_subdir = "cycles/sampling"
|
||||
|
||||
|
||||
classes = (
|
||||
AddPresetIntegrator,
|
||||
AddPresetSampling,
|
||||
)
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
from bpy.utils import register_class
|
||||
for cls in classes:
|
||||
register_class(cls)
|
||||
|
||||
|
||||
def unregister():
|
||||
pass
|
||||
from bpy.utils import unregister_class
|
||||
for cls in classes:
|
||||
unregister_class(cls)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
|
@@ -1714,17 +1714,75 @@ def get_panels():
|
||||
|
||||
return panels
|
||||
|
||||
|
||||
classes = (
|
||||
CYCLES_MT_sampling_presets,
|
||||
CYCLES_MT_integrator_presets,
|
||||
CyclesRender_PT_sampling,
|
||||
CyclesRender_PT_geometry,
|
||||
CyclesRender_PT_light_paths,
|
||||
CyclesRender_PT_motion_blur,
|
||||
CyclesRender_PT_film,
|
||||
CyclesRender_PT_performance,
|
||||
CyclesRender_PT_layer_options,
|
||||
CyclesRender_PT_layer_passes,
|
||||
CyclesRender_PT_views,
|
||||
Cycles_PT_post_processing,
|
||||
CyclesCamera_PT_dof,
|
||||
Cycles_PT_context_material,
|
||||
CyclesObject_PT_motion_blur,
|
||||
CyclesObject_PT_cycles_settings,
|
||||
CYCLES_OT_use_shading_nodes,
|
||||
CyclesLamp_PT_preview,
|
||||
CyclesLamp_PT_lamp,
|
||||
CyclesLamp_PT_nodes,
|
||||
CyclesLamp_PT_spot,
|
||||
CyclesWorld_PT_preview,
|
||||
CyclesWorld_PT_surface,
|
||||
CyclesWorld_PT_volume,
|
||||
CyclesWorld_PT_ambient_occlusion,
|
||||
CyclesWorld_PT_mist,
|
||||
CyclesWorld_PT_ray_visibility,
|
||||
CyclesWorld_PT_settings,
|
||||
CyclesMaterial_PT_preview,
|
||||
CyclesMaterial_PT_surface,
|
||||
CyclesMaterial_PT_volume,
|
||||
CyclesMaterial_PT_displacement,
|
||||
CyclesMaterial_PT_settings,
|
||||
CyclesTexture_PT_context,
|
||||
CyclesTexture_PT_node,
|
||||
CyclesTexture_PT_mapping,
|
||||
CyclesTexture_PT_colors,
|
||||
CyclesParticle_PT_textures,
|
||||
CyclesRender_PT_bake,
|
||||
CyclesRender_PT_debug,
|
||||
CyclesParticle_PT_CurveSettings,
|
||||
CyclesScene_PT_simplify,
|
||||
)
|
||||
|
||||
|
||||
def register():
|
||||
from bpy.utils import register_class
|
||||
|
||||
bpy.types.RENDER_PT_render.append(draw_device)
|
||||
bpy.types.VIEW3D_HT_header.append(draw_pause)
|
||||
|
||||
for panel in get_panels():
|
||||
panel.COMPAT_ENGINES.add('CYCLES')
|
||||
|
||||
for cls in classes:
|
||||
register_class(cls)
|
||||
|
||||
|
||||
def unregister():
|
||||
from bpy.utils import unregister_class
|
||||
|
||||
bpy.types.RENDER_PT_render.remove(draw_device)
|
||||
bpy.types.VIEW3D_HT_header.remove(draw_pause)
|
||||
|
||||
for panel in get_panels():
|
||||
if 'CYCLES' in panel.COMPAT_ENGINES:
|
||||
panel.COMPAT_ENGINES.remove('CYCLES')
|
||||
|
||||
for cls in classes:
|
||||
unregister_class(cls)
|
||||
|
@@ -43,7 +43,7 @@ ccl_device_forceinline float D_ggx_aniso(const float3 wm, const float2 alpha)
|
||||
ccl_device_forceinline float2 mf_sampleP22_11(const float cosI, const float2 randU)
|
||||
{
|
||||
if(cosI > 0.9999f || cosI < 1e-6f) {
|
||||
const float r = sqrtf(randU.x / (1.0f - randU.x));
|
||||
const float r = sqrtf(randU.x / max(1.0f - randU.x, 1e-7f));
|
||||
const float phi = M_2PI_F * randU.y;
|
||||
return make_float2(r*cosf(phi), r*sinf(phi));
|
||||
}
|
||||
@@ -83,7 +83,7 @@ ccl_device_forceinline float3 mf_sample_vndf(const float3 wi, const float2 alpha
|
||||
const float3 wi_11 = normalize(make_float3(alpha.x*wi.x, alpha.y*wi.y, wi.z));
|
||||
const float2 slope_11 = mf_sampleP22_11(wi_11.z, randU);
|
||||
|
||||
const float2 cossin_phi = normalize(make_float2(wi_11.x, wi_11.y));
|
||||
const float2 cossin_phi = safe_normalize(make_float2(wi_11.x, wi_11.y));
|
||||
const float slope_x = alpha.x*(cossin_phi.x * slope_11.x - cossin_phi.y * slope_11.y);
|
||||
const float slope_y = alpha.y*(cossin_phi.y * slope_11.x + cossin_phi.x * slope_11.y);
|
||||
|
||||
|
Reference in New Issue
Block a user