Blender Git Loki
Git Commits -> Revision 861616b
Revision 861616b by Jack Andersen (master) March 13, 2016, 01:05 (GMT) |
Full Inverse-Quadratic-Equation Lamp Falloff This patch adds a new `falloff_type` ('Inverse Coefficients') for Lamps in Blender-Internal and GLSL. The current falloff modes use a formula like this inverse-square one: `I = E � (D^2 / (D^2 + Q � r^2))` While such a formula is simple for 3D-artists to use, it's algebraically cumbersome to work with. Game-designers authoring their own shaders could benefit much more by having direct control of falloff-coefficients: `I = E � (1.0 / (coefC + coefL � r + coefQ � r^2))` In this mode, the `distance` parameter is unused (except for 'Sphere' mode); instead relying on the designer to mathematically-model the falloff-behavior. The UI has been patched like so: {F153843} Reviewers: brecht, psy-fi Reviewed By: psy-fi Subscribers: brita_, antidote, campbellbarton, psy-fi Differential Revision: https://developer.blender.org/D1194 |
Commit Details:
Full Hash: 861616bf693b78b070ada6cbc6aa79eb807fdde8
Parent Commit: 989b0e4
Committed By: Antonis Ryakiotakis
Lines Changed: +89, -9
13 Modified Paths:
/release/scripts/startup/bl_ui/properties_data_lamp.py (+7, -0) (Diff)
/source/blender/blenkernel/intern/lamp.c (+3, -0) (Diff)
/source/blender/gpu/GPU_material.h (+5, -1) (Diff)
/source/blender/gpu/intern/gpu_material.c (+15, -1) (Diff)
/source/blender/gpu/shaders/gpu_shader_material.glsl (+11, -0) (Diff)
/source/blender/makesdna/DNA_lamp_types.h (+6, -4) (Diff)
/source/blender/makesrna/intern/rna_lamp.c (+22, -0) (Diff)
/source/blender/render/intern/include/render_types.h (+1, -0) (Diff)
/source/blender/render/intern/source/convertblender.c (+3, -0) (Diff)
/source/blender/render/intern/source/shadeoutput.c (+10, -1) (Diff)
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+3, -0) (Diff)
/source/gameengine/Rasterizer/RAS_ILightObject.h (+1, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp (+2, -2) (Diff)
/source/blender/blenkernel/intern/lamp.c (+3, -0) (Diff)
/source/blender/gpu/GPU_material.h (+5, -1) (Diff)
/source/blender/gpu/intern/gpu_material.c (+15, -1) (Diff)
/source/blender/gpu/shaders/gpu_shader_material.glsl (+11, -0) (Diff)
/source/blender/makesdna/DNA_lamp_types.h (+6, -4) (Diff)
/source/blender/makesrna/intern/rna_lamp.c (+22, -0) (Diff)
/source/blender/render/intern/include/render_types.h (+1, -0) (Diff)
/source/blender/render/intern/source/convertblender.c (+3, -0) (Diff)
/source/blender/render/intern/source/shadeoutput.c (+10, -1) (Diff)
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+3, -0) (Diff)
/source/gameengine/Rasterizer/RAS_ILightObject.h (+1, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp (+2, -2) (Diff)